3

I have a problem while sending file from linux to SharePoint. Everything is fine if I am uploading to existing directory, I use this method:

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

Unfortunately problem arises when I point the target to non existing directory, like:

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

I would like it to create all necessary directorie on the path. I've tried to use "--create-dirs" CURL option, but it doesn't work.

Any ideas how to achieve the goal? It doesn't have to be CURL actually, i can use different method available on linux.

1 Answer 1

3

As the name (CLIENT URL) suggests, you will not be able to create new directories on remote SERVERS involving http/https while uploading files.

For downloads involving http/https server, --create-dirs option is applicable only on local machines to create new directories (for instance, when you are downloading a content on to your local linux machine).

However, while using ftp/sftp to a server, you will be able to create new directories on the remote server.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.