【发布时间】:2022-01-08 07:00:33
【问题描述】:
我正在尝试制作一个应用程序并能够通过他们的 api 将文件上传到 anonfiles。但是我真的不知道怎么做,因为我从来没有使用过这种类型的api。
请求示例
curl -F "file=@test.txt" https://api.anonfiles.com/upload
我在 webview 中尝试过,它可以工作,但我希望能够在没有 webview 的情况下上传
<form enctype="multipart/form-data" action="https://api.anonfiles.com/v1/upload" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="file" type="file" />
<input type="submit" value="Send File" />
</form>
【问题讨论】:
-
您还在寻找解决方案吗?如果是,我有一个
标签: java android api android-studio file-upload