====== 2022.10.21 Nextcloud curlでアップロード ====== ===== アップロード ===== # nextcloudでのユーザー名 # のパスワード # nextcloudのルートフォルダー 例 https://abc.com/nextcloud # アップロード先ファイルのパス # アップロードしたいファイルが置いてあるパス curl -X PUT -u : https:///remote.php/dav/files// -T ==== 実行例 ==== これで、nc.hogehoge.comにhoge_userで、testフォルダへtest.txtをtest01.txtとしてアップロード curl -X PUT -u 'hoge_user:hoge_pass' https://nc.hogehoge.com/remote.php/dav/files/hoge_user/test/test01.txt -T test.txt ===== ダウンロード ===== # nextcloudでのユーザー名 # のパスワード # nextcloudのルートフォルダー 例 https://abc.com/nextcloud # ダウンロードしたいファイルが置いてあるnextcloud上のパス # ダウンロードしたファイルの保存先 curl -X GET -u : https:///remote.php/dav/files// --output ==== 実行例 ==== これで、nc.hogehoge.comにhoge_userで、testフォルダへtest.txtをtest01.txtとしてアップロード curl -X GET -u 'hoge_user:hoge_pass' https://nc.hogehoge.com/remote.php/dav/files/hoge_user/test/test01.txt --output test.txt {{tag>Nextcloud}}