如何从Linux创建不存在的目录将文件发送到Sharepoint [英] How to send file to Sharepoint from Linux creating non existend directories
问题描述
将文件从linux发送到SharePoint时出现问题。一切都很好,如果我上传到现有的目录,我使用这种方法:
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
我希望它在路径上创建所有必要的directorie。我试图使用--create-dirsCURL选项,但它不工作。
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.
推荐答案
作为名称(CLIENT URL )建议,在上传文件时,您将无法在涉及http / https的远程SERVERS上创建新目录。
As the name (CLIENT URL) suggests, you will not be able to create new directories on remote SERVERS involving http/https while uploading files.
对于涉及http / https服务器的下载,--create-dirs选项仅适用于本地计算机上创建新目录(例如,
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).
但是,对服务器使用ftp / sftp时,您可以在远程服务器上创建新的目录。
However, while using ftp/sftp to a server, you will be able to create new directories on the remote server.
这篇关于如何从Linux创建不存在的目录将文件发送到Sharepoint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!