mar*_*are 5 command-line filenames rename curl
使用curl
's--upload-file
选项上传文件时,如何指定与磁盘上的文件名不同的文件名?使用该-F
选项,我认为可以这样做:curl -F 'file=@/path/to/file/badname;filename=goodname'
,但我不确定如何使用--upload-file
(also -T
)进行等效操作。我使用的 API 要求上传的文件具有特定的文件名,但我不想将文件复制到磁盘上,以便我可以正确上传。
Joe*_*Joe -1
使用curl\xe2\x80\x99s--url
选项,如下所示:
curl --upload-file /path/to/file/badname --url http://serverip/remotedir/goodname\n
Run Code Online (Sandbox Code Playgroud)\n
归档时间: |
|
查看次数: |
21417 次 |
最近记录: |