Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 forbidden error in uploading-files-basic example #2

Open
marpiech opened this issue May 30, 2017 · 2 comments
Open

403 forbidden error in uploading-files-basic example #2

marpiech opened this issue May 30, 2017 · 2 comments

Comments

@marpiech
Copy link

While trying to upload small text file, in uploading-files-basic example, it fails with 403 error.

How to reproduce:

  1. Clone project
  2. Set projectid and authtoken inside index.html in uploading-files-basic
  3. Open index.html in uploading-files-basic
  4. Try to upload small file

Additional info:
After pressing upload button, initial requests are ok:

  1. https://api.dnanexus.com/system/findDataObjects
  2. https://api.dnanexus.com/file/new
    This request fails:
  3. https://api.dnanexus.com/file-????/upload
    However, 403 is reported by this address:
    https://dnanexus-platform-upload-prod.s3.amazonaws.com/filev2/e66b/file/ope…
@cygnil
Copy link
Contributor

cygnil commented May 31, 2017

Thanks for reporting this issue! We'll take a look and check in a fix soon if we find anything.

@JoeSachmo
Copy link

Thanks again for reporting this issue!

It seems like this 403 Forbidden response is due to an invalid CORS request. If you try to open index.html locally, you will likely send an Origin: null header to our back end which is rejected due to security concerns. If you try to load index.html from the web instead, you should be able to execute the uploading-files-basic example without this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants