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 3432868
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:30:11+00:00 2026-05-18T07:30:11+00:00

I have a form that is used to upload the file and a CGI

  • 0

I have a form that is used to upload the file and a CGI program in the server side to process the uploaded file. The file will be renamed to a different file name that I want to pass back to the client, I want to use JSON to return the result, but the browser always prompts me to save the returnd document to a file…

Conclusion: I want to upload a file and from the HTTP response I want to parse it to get the new filename generated by server side.

        <form action="/a.bc?cmd=upload&user_name=binc2&size=100&type=normal" method="post" enctype="multipart/form-data">
                <input type="file" name="image">
                <input type="submit" value="Submit" />
                <input type="text" value="ade75596e1d9a04d4ae0c1e81aa8fcf0" name="key" />
        </form>

The post will get a 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-05-18T07:30:12+00:00Added an answer on May 18, 2026 at 7:30 am

    It sounds like youre not actually making an ajax request… youre being prompted to download because the header is (and should be) application/json. If youre not executing an ajax request or consumign the response with some other script then there is no reason to use json, jsut render whatever you want rendered.

    Also you cant upload files directly with ajax. if you need to do this, do a search for “ajax upload” for various techniques.

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

Sidebar

Related Questions

I have a form in my jsf page(a popup) that I used to upload
I have a file upload form where the file gets uploaded to an S3
I have created a form that is used for both adding and editing a
I have a report that is used by a windows service and a form
i have a form in which user can upload 100 mb file which results
Let's say that I have a file (file1.php) with a simple form with the
i have an asp.net mvc app that has a form that uploads a file.
I have an upload form where users can upload images that are currently being
Scenario : What I have is an upload form that reports on the upload
I have a file upload on my .NET website. I used the FileUpload .NET

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.