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!

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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