完全公开阿里免费图床接口内容
-
由于Chrome Extensions Manifest V3功能限制 不支持拦截请求修改请求头,所以这里把此接口给大家。其他可执行程序可使用,仅需替换请求头。
难点:注册阿里aliexpress账号,换美国全局代理,界面可出现Google授权登陆按步骤注册登陆即可。
拦截URL:https://filebroker.aliexpress.com/x/upload?jiketuchuang=1
替换请求头chrome.webRequest.onBeforeSendHeaders.addListener( function(details) { details.requestHeaders.push({ name: 'Origin', value: 'https://filebroker.aliexpress.com' }); return {requestHeaders: details.requestHeaders}; }, {urls: ["https://filebroker.aliexpress.com/x/upload?jiketuchuang=1"]}, ["blocking", "requestHeaders", "extraHeaders"] );
具体请求内容
define([], function () { return { url: "https://filebroker.aliexpress.com/x/upload?jiketuchuang=1", method: "post", headers: {}, paramName: 'file', otherParams: { "bizCode": "ae_profile_avatar_upload" }, maxFilesize: 51200, acceptedFiles: ".jpg,.jpeg,.gif,.bmp,.png", callback: function (result) { console.log(result) if (!result) { if (window.confirm("上传失败,请检查是否已登录阿里巴巴账号?点击【确定】前往登陆?")) { location.href = "https://best.aliexpress.com/" return "" } } else { url = "" if (result["code"] > 0 && window.confirm("上传失败,请检查是否已登录阿里巴巴账号?点击【确定】前往登陆?")) { location.href = "https://best.aliexpress.com/" return "" } let hosts = ["ae01", "ae02", "ae03", "ae04", "ae05"] let index = parseInt(Math.random() * hosts.length); url = result["url"] url = url.replace("ae02", hosts[index]) return url; } } } });
即刻图床 Manifest V3 版本基本上适配完成,最近将提交一次审核。Manifest V2版本代码我整理一下发出来。