Hello!
I have an external database table with different users. Every user has an avatar stored in the file system. So, in my table I have “avatar” column that has path to users avatar in the file system. All avatars are stored in one folder. How can I move this table to backendless table with all those avatars so they would be stored as images/files, not as paths?
Here is how the table looks like in CSV:
id,name,avatar
1,Ben,/avatar/ben-avatar.png
2,Rob,/avatar/rob-avatar.png
3,Alice,/avatar/alice-avatar.png
4,Alex,/avatar/alex-avatar.png
In Backendless images should be stored as files as we provide file storage for every single app. To migrate this to Backendless you could do the following:
- Save an image in a directory in Backendless. This will return the URL for the image
- Store the URL from (1) in a database record
Regards,
Mark
Hi, Mark!
I have thousands of images and it will take a lot of time to upload them and insert links manually. Is there any way to automate it?
You have to upload the data of images in any case. Be it a file or a database record.
And it is quite hard to create some migration tool, because the requirements of each person may differ significantly.
The main idea was described by Mark. It may be done with some small peace of code, which will use our API to upload file and store the link to the db.