Page 1 of 1

Import multiple file to files collection at one time

Posted: Tue Aug 30, 2016 1:04 pm
by Joni de Campos

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 ?


Import multiple file to files collection at one time

Posted: Wed Aug 31, 2016 7:26 am
by Evgene Karachevtsev

Hello Joni,

Unfortunately you can upload them only one by one.


Import multiple file to files collection at one time

Posted: Wed Aug 31, 2016 5:08 pm
by Joni de Campos

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 ?


Import multiple file to files collection at one time

Posted: Thu Sep 01, 2016 8:28 am
by Serhii Kulibaba

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.


Import multiple file to files collection at one time

Posted: Mon Sep 05, 2016 3:25 pm
by Joni de Campos

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

Workaround ?


Import multiple file to files collection at one time

Posted: Tue Sep 06, 2016 3:42 pm
by Serhii Kulibaba

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


Import multiple file to files collection at one time

Posted: Tue Sep 06, 2016 4:40 pm
by Joni de Campos

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