I am attempting to migrate my server from Parse.com over to Heroku with their one click migration. Their documentation says that Parse Server supports "file" type, but I can't find any documentation on transferring these files so Heroku can access them.
-
If anyone can give an answer to how to migrate files/images etc. from Parse hosting to a heroku/mongoLab setup like Parse suggests, the bounty is yours. – jmk2142 Feb 14 '16 at 01:25
-
2They are currently working on this now. You can follow the progress here: https://github.com/ParsePlatform/parse-server/issues/8. For anyone else reading this, Github is your friend. If you plan on using Parse Server, learn to use Github and Watch the repos so you can keep track of progress. – user3344977 Feb 14 '16 at 01:33
-
Thanks. I've been to the github page a lot but didn't realize it's an issue that's being worked on currently. Great to know. – jmk2142 Feb 14 '16 at 01:54
1 Answers
This isn't an answer but I've been having the same issue/dilemma and have partial information that might be helpful in eventually finding an answer. I did a migration and took a look at some of the stuff going on.
Example, photoObj.get('file').url();
On Parse Hosting: files point to the following: http://files.parsetfss.com/parseFileKey/fileName.ext
This is stored on some amazon S3 thing. Basically this points to: https://s3.amazonaws.com/files.parsetfss.com/parseFileKey/fileName.ext
After migrating to Heroku/MongoLab, photoObj.get('file').url()
points to the following:
http://files.parsetfss.com/newHostFileKey/fileName.ext
newHostFileKey
is something we designate in the parse-server setup and seems to be automatically generated via this setting.
I don't see any evidence so far that the migration tool moves files from Parse Hosting to the new host/db.
File uploading to the new host works fine. On the new host, if one generates a new file it ends up pointing to something like this: http://newHostURL/parse/files/appID/fileName.ext
parse
is whatever you designate at the startup of your parse-server like app.use('/parse', api);
appID
is whatever you designate at the startup of your parse-server like
var api = new ParseServer({
appId: 'appID',
fileKey: 'newHostFileKey'
});
Changing the url point of an Parse Hosted file to fit the new host pattern doesn't yield anything (file not found) etc.
I have no idea how new files are being stored and to where the url routes to.
With new files that are uploaded via the new host, I notice that some new tables/collections are created in the MongoLab DB. These are fs.chunks
and fs.files
fs.chunks
is where the data of the file is being stored (I think). So under the new heroku/mongolab setup, files seem to reside "in" the DB.
As for what the best way is to migrate images from Parse hosting to new hosting is, I have no idea but I'm not sure there is a straightforward answer that is publicly out there at this point.

- 8,581
- 3
- 31
- 47
-
Can we save the images (or files) on local server (E.g: http://domain.com/uploads/photo.png) instead of using S3 bucket? – Phuc Tran Mar 01 '16 at 11:38