Use "/" instead of window.location.origin

It's shorter, more intention revealing, and works across all browsers.
parent 01359db9
...@@ -97,12 +97,12 @@ POST /s3/multipart/:uploadId/complete ...@@ -97,12 +97,12 @@ POST /s3/multipart/:uploadId/complete
DELETE /s3/multipart/:uploadId DELETE /s3/multipart/:uploadId
``` ```
Finally, in your Uppy configuration set `serverUrl` to your app's URL: Finally, in your Uppy configuration point `serverUrl` to your app's URL:
```js ```js
// ... // ...
uppy.use(Uppy.AwsS3Multipart, { uppy.use(Uppy.AwsS3Multipart, {
serverUrl: window.location.origin, // your application serverUrl: '/',
}) })
uppy.on('upload-success', function (file, data, uploadURL) { uppy.on('upload-success', function (file, data, uploadURL) {
...@@ -176,12 +176,12 @@ map "/s3" do ...@@ -176,12 +176,12 @@ map "/s3" do
end end
``` ```
In your Uppy configuration set `serverUrl` to your app's URL: In your Uppy configuration point `serverUrl` to your app's URL:
```js ```js
// ... // ...
uppy.use(Uppy.AwsS3Multipart, { uppy.use(Uppy.AwsS3Multipart, {
serverUrl: window.location.origin, // your application serverUrl: '/',
}) })
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment