Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to external mongo db does not populate file data #434

Closed
ndnguru opened this issue Feb 15, 2016 · 2 comments
Closed

Migration to external mongo db does not populate file data #434

ndnguru opened this issue Feb 15, 2016 · 2 comments

Comments

@ndnguru
Copy link

ndnguru commented Feb 15, 2016

When I tried the migration tool to (transferring to MongoLab), I ran into an issue with files. The migration tool doesn't seem to populate the type, url or name of the file object.

Here is my issue:
I started the migration of my data to a mongoLab db. Then when I went to MonoLab to verify, I noticed a big problem! On my _User collection, for example, I have a field 'photoFile', which stores an image (jpg, png, etc).

When I export the data to JSON using Parse's export tool from the data browser on Parse, I see sufficient data about that photoFile field (example below, what I expect to see in the mongo db):

{
...
"photoFile": {
            "__type": "File",            
            "name": "tfss-XXX-XXX-ETC.png",
            "url": "http://files.parsetfss.com/asdfasdfasdf/tfss-XXX-XXX-ETC.png"
        }
...
}

Now, when I look in the new MongoLab collection for that _User collection, it just has the filename listed instead. No type or location data (URL) is provided as with the JSON export above:

//what I actually see in the mongo db
{
...
     "photoFile": "tfss-XXX-XXX-ETC.png"  
...
}

Questions:

  1. How do I know where to access my data!? No URL means no clue where the file is!
  2. Do I have to change the way I access data on the client side?
  3. How do we migrate files from parse file servers to our own S3 buckets?
@christianmarth
Copy link

Duplicate of #420 and #113

@gfosco
Copy link
Contributor

gfosco commented Feb 16, 2016

So, this is how files have been stored in the database, but the server changes the object before returning it to a client via a query. By providing parse-server with a fileKey (from the parse dashboard settings,) the server can know how to render the same urls. Shouldn't lead to any client changes.

An actual S3 -> S3 migration is being planned. Follow along in #8. Thanks. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants