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

  • SEARCH
  • Home
  • 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 8005795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:19:04+00:00 2026-06-04T17:19:04+00:00

I am using this plugin to let users upload images trough ajax. To create

  • 0

I am using this plugin to let users upload images trough ajax.

To create the uploader and trigger a post this jQuery function is used:

function createUploader() {
        var uploader = new qq.FileUploader({
             element: document.getElementById('file-uploader'),
             allowedExtensions: ['pdf'],
             multiple: false,
             action: '@Url.Action("AjaxUpload", "Upload")',
             onComplete: function(id, fileName, responseJSON){
               window.location.href = responseJSON.message;
            }
        });
    }

Well, in responseJSON.message I am returning the path where the file was uploaded (actually converted) and I am doing a trick with window.location.href to force the browser to show the user DOWNLOAD box for that file.

This works great on FF and Chrome but on IE it says:

Do you want to open or save AjaxUpload from localhost?

And if you press open, instead of getting the file from the specified location, you actually get a file containing responseJSON message.

Any jQuery guru who can give me a clue for this issue?

UPDATE: What I can confirm is that the issue is not with window.location.href = responseJSON.message; because even if I remove this line and put alert('something') the same problems occurs…so instead of parsing onComplete, IE try to open the JSON response…

  • 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-06-04T17:19:05+00:00Added an answer on June 4, 2026 at 5:19 pm

    Try

    return Json(new { Data = new { message = outputFilePathResponse } }, "text/html");
    

    Reference:
    IE tries to download JSON in ASP. NET MVC 3

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

Sidebar

Related Questions

I am using this jQuery plugin to lazy-load my images. Lazy Loader It is
I am using User-Submitted-Posts Plugin in order to let users submit their images to
So I am using the Uplodify plugin to allow users to upload multiple images
So i'm using this plugin https://github.com/podio/jquery-mentions-input for my comment system, everything works fine but
I'm using this PHP plugin for image manipulation: http://wideimage.sourceforge.net/ This is my code: WideImage::load('images/image_test.jpg')
I am using this jQuery plugin in my app http://www.building58.com/examples/tabSlideOut.html It all works well
I'm using this jquery plugin ajaxFileupload in our project. My design is I have
I'm using a jQuery Range slider to let users select a time range in
Using Flask Flask-sqlalchemy Sqlalchemy Jquery Datatables (jquery plugin) Jeditable (jquery plugin) Consider this user
I'm using this plugin: http://jquerytools.org/documentation/validator/index.html Does anyone know how to validate select elements with

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.