Hi
I am using combination of tusdotnet and uppy for uploading file.
Uppy on frontend and tusdotnet in backend (setting up in dotnet core startup as middleware). For same domain, when Frontend Uppy and Backend Tusdotnet are in same web application, it works fine.
But i want to keep tusdotnet in my web api, and Uppy on different domain as frontend.
And it failed to upload file. I have Enable CORS on both ends
I get these errors in developer tool;
uppy.min.js:1 Refused to get unsafe header “Location”
uppy.min.js:1 [Uppy] [08:34:21] Failed to upload test1.pdf tus: invalid or missing Location header, originated from request (response code: 201, response text: )
error with file: uppy-test1/pdf-1e-application/pdf-25000000-1594654313511
error message: Error: tus: invalid or missing Location header, originated from request (response code: 201, response text: )
at new t (uppy.min.js:1)
at e.value (uppy.min.js:1)
at XMLHttpRequest.t.onload (uppy.min.js:1)
Network Headers:
- Request URL:
- Request Method:
POST
- Status Code:
201 Created
- Remote Address:
- Referrer Policy:
no-referrer-when-downgrade
-
Response Headersview source
-
Access-Control-Allow-Origin:
-
Content-Length:
0
- Date:
Thu, 23 Jul 2020 07:34:01 GMT
- Location:
/files/53e5d9e6de0248869bdb8897f61a5bf9
- Server:
Kestrel
- Tus-Resumable:
1.0.0
- Upload-Expires:
Thu, 23 Jul 2020 08:04:02 GMT
-
Request Headersview source
-
Accept:
4./*
- Accept-Encoding:
gzip, deflate, br
- Accept-Language:
en-US,en;q=0.9
- Connection:
keep-alive
- Content-Length:
0
- Host:
localhost:4200
- Origin:
- Sec-Fetch-Dest:
empty
- Sec-Fetch-Mode:
cors
- Sec-Fetch-Site:
cross-site
- Tus-Resumable:
1.0.0
- Upload-Length:
25000000
- Upload-Metadata:
relativePath bnVsbA==,name dGVzdDEucGRm,type YXBwbGljYXRpb24vcGRm,filetype YXBwbGljYXRpb24vcGRm,filename dGVzdDEucGRm
- User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36