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.