You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 19, 2019. It is now read-only.
I've modified this sample to include the content type so the file(s) are understandable by a browser, but this doesn't set the content type:
var options = { contentSettings: { contentType: 'application/pdf'}}; fileService.createFileFromLocalFile(shareName, directoryName, fileName, imageToUpload, options, function (error) { if (error) { callback(error); } else {
This doesn't work with a PDF and it doesn't work with an image (image/png). How can I set the content type on an uploaded file so the file is accessible from my website?