Skip to content

ParseFile upload with javasctipt creating Access-Control-Allow-Origin #118

Closed
@skavinvarnan

Description

@skavinvarnan

When i tried to upload a file to parse-server using this documentation its throwing an error Access-Control-Allow-Origin.

Digging more into the request and response i found that the below Response Header is missing out these
Access-Control-Allow-Headers:*
Access-Control-Allow-Methods:GET,PUT,POST,DELETE,OPTIONS
Access-Control-Allow-Origin:*

I tried saving a ParseObject using this documentation In that response i do get the above Response Headers and everything works fine

Note: I tried to upload the ParseFile with the same code to Parse Main server and everything worked fine. I also got the Response Header as * for Access-Control-Allow-Headers and Methods

I found a comment in files.js
// TODO: do we need to allow crossdomain and method override?

I think my problem will be solved when crossdomain is added

Environment:
node version: 4.2.4
parse-server version: 2.0.3

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