I can upload file to SharePoint library using JS and REST. The content type of added file is as library default content type. How can i specify file content type when uploading file? Thanks!


You cannot specify metadata when uploading a file via REST. You have to upload the file, then update it afterwards. To specify content type, simply specify the ContentTypeId when updating the metadata.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.