Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6644185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:08:16+00:00 2026-05-26T00:08:16+00:00

I have implemented upload feature in ASP.MVC. I am using jQuery.BlockUI and JQuery.Form plugins

  • 0

I have implemented upload feature in ASP.MVC. I am using jQuery.BlockUI and JQuery.Form plugins (but I don’t know is this important). And everything works perfect in Google Chrome.

But in Mozilla and Internet Explorer it doesn’t. When I try to upload image it asks me in popup window:

Upload. You have chosen to open Upload which is a: application/json
from http://localhost:2993 What should Firefox do with this file?

And I have open with/save and browse options.

In my upload method I am returning JSon here is the code:

[HttpPost]
public JsonResult Upload()
{
   string savedFileName = null;
   string hName = null;
   for (int i = 0; i < Request.Files.Count; i++)
   {
      HttpPostedFileBase hpf = Request.Files[i] as HttpPostedFileBase;
      if (hpf.ContentLength == 0)
         continue;

      string savedFileNameThumb = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
                   "Content", "Images", "Thumb",
                   Path.GetFileName(hpf.FileName));

      savedFileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
                   "Content", "Images", "Full",
                   Path.GetFileName(hpf.FileName));
      hName = hpf.FileName;

      ImageModel.ResizeAndSave(savedFileName, hpf.FileName, hpf.InputStream, int.MaxValue, false);
      // for cropping
      ImageModel.ResizeAndSave(savedFileName, hpf.FileName, hpf.InputStream, 540, false);
   }

   string r = string.Format("../../Content/Images/Full/{0}", hName);
   return Json(new { foo = r });
}

What produce this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:08:16+00:00Added an answer on May 26, 2026 at 12:08 am

    You are returning JSON as the page to the user following the upload. The JSON won’t make any sense to a regular user, so most browsers doesn’t have any predefined way to display the JSON.

    If the returned page is displayed somewhere, you should return a regular HTML page that means something to the user. If the page isn’t really displayed somewhere (e.g. loaded in a hidden frame), you should return an empty HTML page that all browsers know how to display.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented Uploadify in my ASP.NET MVC 3 application to upload images, but
jQuery Uploadify plugin uses flash swf to upload files. I have implemented it on
I have implemented fileupload functionality using apache commons file upload library and implemented logic
I have implemented plupload in my MVC app. It was going fine but was
I have implemented a simple file upload-download mechanism. When a user clicks a file
I have implemented a file transfer rate calculator to display kB/sec for an upload
I have implemented what I thought was a pretty decent representation of MVC in
I have implemented tracing based on System.Diagnostics. I am also using a System.Diagnostics.TextWriterTraceListener, and
We have implemented a popup window as a modal dialog using the IE method:
I have implemented authentication systems for webapps several times over the years, but before

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.