I have to upload files from linux box to SharePoint Online. I have used following command:

curl -k -ntlm --user myusername:password --upload-file test.txt "https://url/test.txt" -v

But I get error:


However, wget command works perfectly to download files.

wget --cookies=on --load-cookies cookies.txt --keep-session-cookies --user myusername --password mypassword "https://url/test.txt"

Is there a way to make it work?


You may try the below command:

curl --ntlm --user username:password --upload-file myfile.xls https://sharepointserver.com/sites/mysite/myfile.xls


Need to upload files from Linux to Sharepoint

Uploading file to MS sharepoint using CURL fails

| improve this answer | |
  • this is exactly what I have used. But it seems it seems -ntlm is not supported. – certque Jun 26 at 11:21

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.