Owncloud将文件上传到特定文件夹 - curl

时间:2016-04-30 14:00:20

标签: curl owncloud

我希望在特定文件夹中的我自己的云服务器上通过curl上传文件。例如:Private Shared Function convertToDT(filePath As String) As DataTable Dim detailDataTable As New DataTable() Using csvReader As New TextFieldParser(filePath) csvReader.SetDelimiters(New String() {","}) csvReader.HasFieldsEnclosedInQuotes = True Dim colFields As String() = csvReader.ReadFields() For Each column As String In colFields Dim datecolumn As New DataColumn(column.ToLowerInvariant) datecolumn.AllowDBNull = True detailDataTable.Columns.Add(datecolumn) Next While Not csvReader.EndOfData Dim rowData As String() = csvReader.ReadFields //sometimes rowData convert invalid name For i As Integer = 0 To rowData.Length - 1 //perform operation Next If rowData IsNot Nothing AndAlso rowData(0) IsNot Nothing Then If Not (rowData(0).StartsWith("#") Or String.IsNullOrEmpty(rowData(0))) Then detailDataTable.Rows.Add(rowData) End If End If End While End Using Return detailDataTable End Function 。目前我无法将文件上传到我自己的云服务器上的文件夹中。有什么想法吗?

1 个答案:

答案 0 :(得分:4)

$ curl --user username:password -X PUT "https://www.myowncloudserver.com/remote.php/webdav/MY_FOLDER" --data-binary @"file.txt"