Bootstrap images to CountryPicture Entity?

Bootstrap images to CountryPicture Entity?

  

Hello everyone,

I just imported the "Locations" app into my environment and I'm using the Country entity on my testApp (all fine here).

Now, what I would like to do is to mass import an image (flag) for each country. 

For that, I have created a new entity named CountryPicture with the following attributes:

  • Id (Country Identifier)
  • Content (Binary Data)
  • Filename (Text)
  • Filetype (Text)

I have an Excel file with the same structure(in the content column I have the fullpath+filename). Can I bootstrap this into the CountryPicture entitiy? If so, how do I convert the fullpath+filename into binary data?

Perhaps i'm confusing the concepts, but thats what I understood from this answer. If someone could guide me I would appreciate it.

Hello Hugo,


From what I understood, you're trying to import information from outside of the system into the system. In that case, in order to achieve that using an Excel file, you would:

[Outside of OutSystems]

- Get the Base64 of each image you want to import

- Put the Base64 on the Excel file

[In OutSystems]

- Import that Excel file

- Read that Base64, convert it into binary and store it in the DB.


This would be something I would do if I was in your shoes and "tied" to an excel file. If you're not tied to an excel file and if the OutSystems server has internet access, I could suggest put all those flags in a publicly accessible folder - like dropbox or similar - with some proper names and then, for each "record", would retrieve the binary content of the file in the "cloud".


If we're talking about different scenarios, let me know. I'm glad to help you out. 

Armando Gomes wrote:

Hello Hugo,


From what I understood, you're trying to import information from outside of the system into the system. In that case, in order to achieve that using an Excel file, you would:

[Outside of OutSystems]

- Get the Base64 of each image you want to import

- Put the Base64 on the Excel file

[In OutSystems]

- Import that Excel file

- Read that Base64, convert it into binary and store it in the DB.


This would be something I would do if I was in your shoes and "tied" to an excel file. If you're not tied to an excel file and if the OutSystems server has internet access, I could suggest put all those flags in a publicly accessible folder - like dropbox or similar - with some proper names and then, for each "record", would retrieve the binary content of the file in the "cloud".


If we're talking about different scenarios, let me know. I'm glad to help you out. 

Hi, I know this is an old post but I am also trying to figure out how to populate a database with images connected to particular people. I'm new to outsystems so I am wondering how you would go about converting the base64 String to binary on service studio? In the actions, what exactly would that look like?