0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

curl で Synology の WebDAV にアクセスする

Last updated at Posted at 2021-03-03

こちらと同じことを curl で行いました。
cadaver で Synology の WebDAV にアクセスする

ファイルのアップロード

URL=https://example.synology.me:5006/homes/scott/tmp/tmp01.txt
#
curl --user scott:secret -T tmp01.txt --url $URL -X PUT

ファイルのダウンロード

URL=https://example.synology.me:5006/homes/scott/tmp/tmp02.txt
#
curl --user scott:secret --url $URL -X GET > tmp02.txt

より安全なファイルのアップロード

URL=https://example.synology.me:5006/homes/scott/tmp/tmp01.txt
#
curl --netrc-file $HOME/.netrc -T tmp03.txt --url $URL -X PUT

より安全なファイルのダウンロード

URL=https://example.synology.me:5006/homes/scott/tmp/tmp02.txt
#
curl --netrc-file $HOME/.netrc --url $URL -X GET > tmp02.txt

$HOME/.netrc

$HOME/.netrc
machine example.synology.me
  login scott
  password secret
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?