I am working on a site that involves uploading songs, and I'm saving the songs with Parse, using this code:
var parseFile = new Parse.File(fileName, file);
parseFile.save().then(function() {
// The file has been saved to Parse.
saveToServer(songName, parseFile);
}, function(error) {
// The file either could not be read, or
// could not be saved to Parse.
alert(songName + " couldn't be saved, beacuse: " + error.message);
});
For some reason, that code takes an excessive amount of time to run (e.g., 20 minutes for 12 songs).
I have tried to use setTimeout
for every song so they will be saved in parallel, but that doesn't improve anything.
I found Parse.com save slow with pointers to files but the problem described there is different than mine.
Does anyone knows if there is any way to speed it up what I'm trying? Or maybe it's impossible with Parse?