Skip to content

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

Description

@ndnguru

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?

Activity

  1. christianmarth commented on Feb 16, 2016

    @christianmarth

    Duplicate of #420 and #113

  2. gfosco commented on Feb 16, 2016

    @gfosco
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions