Skip to content

[BUG] Unable to upload gpx file from website - CORS policy #53

@pagaia

Description

@pagaia

Unable to upload gpx file from website - CORS policy

Describe the bug

I want to upload some gpx file from the website, but I got an error:
Access to fetch at 'https://api.bikedataproject.org/file/upload' from origin 'https://www.bikedataproject.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

A clear and concise description of what the bug is.
Impossibility to upload a file from the website

To Reproduce

Steps to reproduce the behavior

  1. Navigate to https://www.bikedataproject.org/#donate
  2. Scroll to the Share your bike data section
  3. Select GPX or FILE UPLOAD buttons
  4. Select the file you want to upload
  5. Submit
  6. You can see this message on the popup Something went wrong, are you uploading the correct files? (.gpx and/or .fit)
    please try again.
  7. Looking at the console this is the error:
    Access to fetch at 'https://api.bikedataproject.org/file/upload' from origin 'https://www.bikedataproject.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Expected behavior

Able to upload the gpx file

A clear and concise description of what you expected to happen.

Attachments

If applicable, add screenshots, code snippets or logs to help explain your problem.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions