Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

api重复文件上传响应不规范我能在这提交吗? #3

Open
1265578519 opened this issue Mar 8, 2020 · 2 comments
Open

api重复文件上传响应不规范我能在这提交吗? #3

1265578519 opened this issue Mar 8, 2020 · 2 comments

Comments

@1265578519
Copy link

URL: {"success":true,"code":"success","message":"Upload success.","data":{"file_id":0,"width":256,"height":256,"filename":"Test.png","storename":"WSfJZuTP2bi94Ik.png","size":27378,"path":"/2020/03/08/WSfJZuTP2bi94Ik.png","hash":"d4bT9laPq36sjCnH8G7prcWQmD","url":"https://i.loli.net/2020/03/08/WSfJZuTP2bi94Ik.png","delete":"https://sm.ms/delete/d4bT9laPq36sjCnH8G7prcWQmD","page":"https://sm.ms/image/WSfJZuTP2bi94Ik"},"RequestId":"6C2C7F20-FB9D-4AE6-86C1-6437DCFD9797"}

OR

URL: {"success":false,"code":"image_repeated","message":"Image upload repeated limit, this image exists at: https://i.loli.net/2020/03/08/WSfJZuTP2bi94Ik.png","images":"https://i.loli.net/2020/03/08/WSfJZuTP2bi94Ik.png","RequestId":"9F919157-AF31-4BE0-B74F-0106661DF8EB"}

导致data.url无法获取到重复文件的url

@1265578519
Copy link
Author

1265578519 commented Mar 8, 2020

想自己写个discuz插件的发现响应是两个不同的字段。话说有没有公共api?不用传到自己号的那种 就和sm.ms主页那样,免登录
文档中提供的14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf测试不可用

@mrjun12
Copy link
Collaborator

mrjun12 commented Mar 9, 2020

代码中新增了 重复情况的处理。

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

No branches or pull requests

2 participants