A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Dear TheodoreL,
Yes, it is.
Thanks for your effort and time!
Sincerely,
Cliff | Microsoft Community Moderator
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How would I utilize SPServices to add a new item to a document library?
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Dear TheodoreL,
Yes, it is.
Thanks for your effort and time!
Sincerely,
Cliff | Microsoft Community Moderator
Thanks!
// Define the folder path for this example.
var serverRelativeUrlToFolder = '/shared documents';
So in the code above, is "shared documents" the name of the document library it is going to?
Dear TheodoreL,
The simplest way to upload a file to use the Upload option in the site library or go to http://site/_layouts/Upload.aspx?List={ID to the library} to upload the files.
To use Rest API and jQuery, you may also create a Upload button by HTML code. To insert the code on a modern page, you may use the modern script editor web part.
You may follow the steps in SharePoint | Online | Best Practice | install Modern Script Editor Web Part for SharePoint Online Modern Site. (microsoft.com) to deploy the web part in your tenant first.
Then you can follow the steps in Upload a file by using the REST API and jQuery | Microsoft Learn to upload a file by using Rest API and jQuery.
May I know whether you have some specific requirement by using jQuery and Rest API?
Another simpler way to upload a file to SharePoint Online may be to use PowerApps and Power Automate if you want to deploy a customized solution in your tenant.
Thanks for your effort and time!
Sincerely,
Cliff | Microsoft Community Moderator