Skip to content

CORS error when uploading via S3 file adapter #722

@davidruisinger

Description

@davidruisinger

Environment Setup

Parse Server running on AWS elastic beanstalk with configured S3 files adapter.

  ...
  filesAdapter: new S3Adapter(
    "****",
    "****",
    "my-bucket",
    {
      bucketPrefix: "files/",
      directAccess: true
    }
  )
  ...

Steps to reproduce

Using the JS SDK from an external Website to upload an Image:

  var parseFile = new Parse.File(name, file, type);
  parseFile.save().then(function() {
  ...

Logs/Trace

Error in chrome:

XMLHttpRequest cannot load http://myelasticbeanstalkURL.com/parse/files/RNLDeC7GCT.png. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http:/myexternalURL.com' is therefore not allowed access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions