ユーザ用ツール

サイト用ツール


50_dialy:2022:10:21

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
50_dialy:2022:10:21 [2022/10/20 23:23] – 作成 matsui50_dialy:2022:10:21 [2022/10/20 23:26] (現在) matsui
行 4: 行 4:
 ===== アップロード ===== ===== アップロード =====
  
-```+<code>
 # <user> nextcloudでのユーザー名 # <user> nextcloudでのユーザー名
 # <pass> <user>のパスワード # <pass> <user>のパスワード
行 11: 行 11:
 # <file path to send> アップロードしたいファイルが置いてあるパス # <file path to send> アップロードしたいファイルが置いてあるパス
 curl -X PUT -u <user>:<pass> https://<nextcloud root>/remote.php/dav/files/<user>/<path to upload> -T <file path to send> curl -X PUT -u <user>:<pass> https://<nextcloud root>/remote.php/dav/files/<user>/<path to upload> -T <file path to send>
-``+</code>
  
 ==== 実行例 ==== ==== 実行例 ====
行 19: 行 19:
 <code> <code>
 curl -X PUT -u 'hoge_user:hoge_pass' https://nc.hogehoge.com/remote.php/dav/files/hoge_user/test/test01.txt -T test.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
 +</code>
 +
 +
 +===== ダウンロード =====
 +
 +<code>
 +# <user> nextcloudでのユーザー名
 +# <pass> <user>のパスワード
 +# <nextcloud root> nextcloudのルートフォルダー 例 https://abc.com/nextcloud
 +# <path of file to download> ダウンロードしたいファイルが置いてあるnextcloud上のパス
 +# <path to save> ダウンロードしたファイルの保存先
 +curl -X GET -u <user>:<pass> https://<nextcloud root>/remote.php/dav/files/<user>/<path of file to download> --output <path to save>
 +</code>
 +
 +==== 実行例 ====
 +
 +これで、nc.hogehoge.comにhoge_userで、testフォルダへtest.txtをtest01.txtとしてアップロード
 +
 +<code>
 +curl -X GET -u 'hoge_user:hoge_pass' https://nc.hogehoge.com/remote.php/dav/files/hoge_user/test/test01.txt --output test.txt
 </code> </code>
  
 {{tag>Nextcloud}} {{tag>Nextcloud}}
50_dialy/2022/10/21.1666308230.txt.gz · 最終更新: 2022/10/20 23:23 by matsui