yakuza0 2.23.28-beta.1 → 2.23.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/tfs.plugin.js +4 -5
package/package.json
CHANGED
package/template/tfs.plugin.js
CHANGED
|
@@ -90,6 +90,8 @@ export default async (ctx, inject) => {
|
|
|
90
90
|
// 拓展平台对象存储
|
|
91
91
|
tfs.fastdfs = async (fileUrl, opt) => {
|
|
92
92
|
const serv = $yk.proxyServer && $yk.proxyServer.services && $yk.proxyServer.services['$'];
|
|
93
|
+
const __cFileName = opt.__cFileName || ""
|
|
94
|
+
opt = _.omit(opt, ['__cFileName'])
|
|
93
95
|
|
|
94
96
|
if (!serv) {
|
|
95
97
|
console.error(errMsg['proxyServer.baseKey.none']);
|
|
@@ -101,6 +103,7 @@ export default async (ctx, inject) => {
|
|
|
101
103
|
...opt,
|
|
102
104
|
query: {
|
|
103
105
|
fileUrl,
|
|
106
|
+
__cFileName,
|
|
104
107
|
}
|
|
105
108
|
})
|
|
106
109
|
}
|
|
@@ -224,11 +227,7 @@ export default async (ctx, inject) => {
|
|
|
224
227
|
if (isNFS(fileUrl)) {
|
|
225
228
|
res = await tfs.nfs(fileUrl);
|
|
226
229
|
} else {
|
|
227
|
-
res = await tfs.fastdfs(fileUrl, {
|
|
228
|
-
headers: {
|
|
229
|
-
'X-Save-As-Unicode': toUnicode(filename),
|
|
230
|
-
}
|
|
231
|
-
});
|
|
230
|
+
res = await tfs.fastdfs(fileUrl, {__cFileName: filename});
|
|
232
231
|
}
|
|
233
232
|
if (res) {
|
|
234
233
|
fetchDownload(res, filename);
|