I have an issue with file upload. I have the following error message:XMLHttpRequest cannot load https://api.backendless.com/<url…>. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8000’ is therefore not allowed access.
But Satus is 200, and file was uploaded successfuly. I can see it in “Files” pages.
But I have an error and can not handle success case.
Could you please help me? What am I doing wrong?
I have the sane issue when i am using code generated by Backendless for JS.
I think answer from this topic will help you:
This topic did not help me. I am still having the same problem.
Backendless.Files.upload(files, TEST_FOLDER, false, callback);
I have this code in my generated file.
But it does not work.
Any other ideas?
Could you please describe your scenario/environment in greater detail? For example, where does localhost:8000 come from? What does your code look like outside of the one line you showed?
I started local server with NodeJS for SPA development. So, server is running on localhost and using :8000 port. When I make POST request I am using following url:
- Request URL:https://api.backendless.com/D77821BA-2D1C-09B3-FFCF-1F4D5C5D1C00/v1/files/rooms/ic_add.png
Status Code:200 OK
Response Headersview source
Cache-Control:: no-store, no-cache, must-revalidate, private
Date:Sat, 12 Dec 2015 00:17:18 GMT
Expires:Thu, 01 Jan 1970 00:00:01 GMT
Request Headersview source
Accept:application/json, text/plain, */*
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36
Content-Disposition: form-data; name="file"; filename="ic_add.png"
Error in console:
XMLHttpRequest cannot load https://api.backendless.com/D77821BA-2D1C-09B3-FFCF-1F4D5C5D1C00/v1/files/rooms/ic_add.png. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8000’ is therefore not allowed access.
What other information do you need?
Thank you for detailed description!
We will investigate this use case on our side.
i have the same problem here, 2 months had passed. Any news?
Looks like we dropped the ball on this. I apologize. I have scheduled an internal ticket and now this problem is being tracked.
I am also having this issue.
Hi Phil, All,
The issue has been resolved and would be fixed in next upcoming release.
The release is scheduled for tomorrow…
[spoiler=“still waiting for the release…”]
When you see it on our blog/twitter/facebook, you will know it is there.
Hi Andrei, Lâm, Phil
The issue has been resolved and fix is now available in production.