I want to transfer an image with any extension. Currently I have my code as:
var options = new FileUploadOptions();
options.fileKey = 'file';
options.fileName = imageData.substr(imageData.lastIndexOf('/')+1);
options.mimeType = "image/jpeg";
Even if I upload a .gif
or a .png
file, its sent over as .jpeg
. What do I need to put in options.mimeType = "image/jpeg";
?
Many thanks.
You can change it to
mimeType: "multipart/form-data"
It will allow for selecting different types of image.