فهرست منبع

Fix(1607): Add remote-url to emit-success

S3 stores the remote-url of the newly stored file in the `Location`-property of the response. Use it as remote-url-param.

Fixes https://github.com/transloadit/uppy/issues/1607
Zyclotrop-j 5 سال پیش
والد
کامیت
65bef980e2
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      packages/@uppy/companion/src/server/Uploader.js

+ 2 - 1
packages/@uppy/companion/src/server/Uploader.js

@@ -480,7 +480,8 @@ class Uploader {
       if (error) {
         this.emitError(error)
       } else {
-        this.emitSuccess(null, {
+        const url = data && data.Location ? data.Location : null;
+        this.emitSuccess(url, {
           response: {
             responseText: JSON.stringify(data),
             headers: {