Skip to content
This repository was archived by the owner on Sep 19, 2019. It is now read-only.
This repository was archived by the owner on Sep 19, 2019. It is now read-only.

Setting content type on file isn't working #5

@ghost

Description

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions