1

I would like to be able to have one of my users click a file chooser

<input type="file"  multiple />

They would then be able to select one or more files that have a particular extension (chosen for use for this application, on a file designed for use with this application), and submit those files to a RESTful interface to be processed.

I've seen examples where a file is submitted as a part of a multi-part form. Such as: REST - HTTP Post Multipart with JSON

However, the header information for each part lists the format of the context, for example "image/jpeg".

If the file I have created for this custom application is not of a standard mime type, can I still somehow transmit multiple files? What about if I want to also send some xml or json data in the same multi-part request?

Do the extension and mime-type always match? For example, if I wanted to send over a serialized object from some language, or an xml file containing the info, but wanted to give it a customized extension, could I still use a corresponding mime type?

Community
  • 1
  • 1
Josh the Aspie
  • 493
  • 4
  • 7

0 Answers0