简易图床

https://github.com/Eslzzyl/imagebed

状态

当前文件仓库总体积:10.8 MB

当前文件总数:65

在线上传





删除文件

你获得的文件哈希是你对该文件所有权的唯一证明。你可以通过提供文件名来要求服务器删除它。



通过脚本上传

使用 Axios 提交请求上传文件:

const formData = new FormData();
formData.append('file', file);

axios.post('https://img.orii.top/upload', formData, {
    headers: {
        'Content-Type': 'multipart/form-data',
    }
}).then(response => {
    console.log("文件上传成功,链接为:", response.data);
}).catch(error => {
    console.error("文件上传失败", error.message);
});

通过脚本删除文件

向 https://img.orii.top/delete 发 POST 请求,请求体携带你想删除的文件名,格式如下:

{ "file": "example.jpg" }

服务器回复 200 OK,表示文件已经成功删除;回复 404,表示你提供的文件找不到。