Issue Description
When uploading a ParseFile as a parameter to cloud code it does not automatically parse the object and transform it into the ParseFile on the cloud code side. On parse.com it would do this automatically. Essentially I could save a file on the client and then pass the ParseFile as a parameter in a cloud call and then on the cloud side it would show up as a ParseFile. Documented here: https://parse.com/docs/rest/guide#objects-data-types . Instead the cloud side just sees a normal JSON object that would represent a ParseFile. Even using the Parse Client JS SDK has the same problem.
To further muck up the situation, parse-server allows these JSON objects to be saved in File columns but when they are retrieved they are still a basic JSON object and calling .url() causes the server to spin forever and never complete the request.
- Was this functionality intentionally removed?
- While its fine that it doesn't automatically convert to a ParseFile, the Parse SDK doesn't provide a way to create a Parse.File manually from such a JSON structure. Any thoughts?
Steps to reproduce
- Run code such as:
var parseFile = new Parse.File("theFile", document.getElementById("theFile").files[0]);
parseFile.save().then(function(file){
Parse.Cloud.run("cloudFunction", {file:file})
})
Expected Results
Parse.Cloud.define("cloudFunction", function(request, response) {
response.success(request.params.file instanceof Parse.File);
})
request.params.file instanceof Parse.File === true;
Actual Outcome
request.params.file instanceof Parse.File === false;
Environment Setup
- Server
- parse-server version: 2.2.14
- Localhost or remote server? Azure
- Database
N/A -- Completely parse-server software issue
Logs/Trace
Outcomes above should be detailed enough.
Issue Description
When uploading a ParseFile as a parameter to cloud code it does not automatically parse the object and transform it into the ParseFile on the cloud code side. On parse.com it would do this automatically. Essentially I could save a file on the client and then pass the ParseFile as a parameter in a cloud call and then on the cloud side it would show up as a ParseFile. Documented here: https://parse.com/docs/rest/guide#objects-data-types . Instead the cloud side just sees a normal JSON object that would represent a ParseFile. Even using the Parse Client JS SDK has the same problem.
To further muck up the situation, parse-server allows these JSON objects to be saved in File columns but when they are retrieved they are still a basic JSON object and calling .url() causes the server to spin forever and never complete the request.
Steps to reproduce
Expected Results
request.params.file instanceof Parse.File === true;Actual Outcome
request.params.file instanceof Parse.File === false;Environment Setup
N/A -- Completely parse-server software issue
Logs/Trace
Outcomes above should be detailed enough.