Joni de Campos
Posts: 0
Joined: Fri Dec 11, 2015 12:21 pm

Import multiple file to files collection at one time

I have exported the database collections to setup a production environment for my application.

Importing all collection went just well.

Now I have to import the exported files collection.

How can I import all files at once ?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Import multiple file to files collection at one time

Hello Joni,

Unfortunately you can upload them only one by one.

Joni de Campos
Posts: 0
Joined: Fri Dec 11, 2015 12:21 pm

Import multiple file to files collection at one time

This is the image id from the backup:

1a2e5eae-5451-4826-85a9-d942084b2827.bradpitt.jpg

Bellow is the id created from the import process:

e000eb03-50e7-41f2-aa8c-a222e2bf8c89.1a2e5eae-5451-4826-85a9-d942084b2827.bradpitt.jpg

How can we solve this problem.

I think images import process should keep the same id, other wise we could loose the image reference associated in other colletcions...or this is not true ?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Import multiple file to files collection at one time

Hello Joni,

Appery.io generates file names automatically, so it is impossible to keep them after importing files (also from the backup). Yes, in that case you can lost all you DB relations.

Joni de Campos
Posts: 0
Joined: Fri Dec 11, 2015 12:21 pm

Import multiple file to files collection at one time

Hmmm... it should import like when you import a user collection.

Workaround ?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Import multiple file to files collection at one time

The workaround is:
Use a script, which gets a file list from the collection "files".
It should read all rows which use files and updates them with a new filename

Joni de Campos
Posts: 0
Joined: Fri Dec 11, 2015 12:21 pm

Import multiple file to files collection at one time

Thanks Sergiy. I will give a try and let you know the results.

Return to “Issues”