Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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.
Required, but never shown