Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增从Linux服务器命令行上传文件的api #153

Open
yyxx1997 opened this issue May 2, 2024 · 3 comments
Open

新增从Linux服务器命令行上传文件的api #153

yyxx1997 opened this issue May 2, 2024 · 3 comments

Comments

@yyxx1997
Copy link

yyxx1997 commented May 2, 2024

#25 跟这个issue里面的需求有点不同,我希望从Linux服务器上通过命令将大文件上传至FileBox里,然后得到取件码或者链接等返回。

因为大部分大文件都是存放在服务器的硬盘上,如果想要通过网页的方式上传需要先下载到window电脑再上传,浪费带宽。

@acgurl
Copy link

acgurl commented Jun 20, 2024

同求

@liangsheng8708
Copy link

liangsheng8708 commented Jun 21, 2024

我抓包看了下,直接请求http(s)://你的域名或者ip/share就可以了
可以参考下我这个
curl -X POST -H "Content-Type: multipart/form-data" -F "file=@文件地址" https://你的域名/share

@liangsheng8708
Copy link

我抓包看了下,直接请求http(s)://你的域名或者ip/share就可以了 可以参考下我这个 curl -X POST -H "Content-Type: multipart/form-data" -F "file=@文件地址" https://你的域名/share

v2.1示例:
curl -X POST 'https://域名或ip/share/file/' -H 'Content-Type: multipart/form-data' -F 'file=@/mnt/vda1/1.txt;type=text/plain' -F 'expire_value=1' -F 'expire_style=day'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants