Closed
Description
Hello such community I have the following question'm trying to upload a file, but I have the following error
add these lines of code for testing file uploading #20
change the application ID and the rest-api-key
and finally add a service to upload the file
Upload: function(file) {
var defer = $q.defer();
var parseFile = new Parse.File(file.name, file);
parseFile.save({
success: function(savedFile) {
defer.resolve(savedFile);
},
error: function(error) {
defer.reject(error);
}
});
return defer.promise;
but it continues to appear the same mistake :(
MLHttpRequest cannot load https://xxxxxxxx/parse/files/4188biun0z82kklf3euc_400x400.jpeg. Request header field X-Parse-Application-ID is not allowed by Access-Control-Allow-Headers in preflight response.
main.js:43 Unable to connect to the Parse API
Anyone know how I solve this?
Thank you very much for your time