Upload images

  
Hello Outsystems community,
I would like to upload images(pdf, tiff, etc) on a web screen.  Is this possible in Outsystems and please show me how this can be done?  If this can be done, can I upload an image in each row of a Table Record and can I display the image in each row of a Table Record.
Thanks,
Frank
Yes you can.

I think it's even handled in the online training
Just make sure you have the datamodel correct (and the binary-data in in different entity)
Hi Frank,

The way to do it is to include an Image widget in a cell of the Table Records widget, and set its type to  "Database". Next, make sure you have a table to store the images in, and make sure there's a column of Data Type "Binary Data". Set the "Attribute" property of the Image widget to that table and field. The Table Records widget should have a dataset that includes that table. Set the Image widget's Entity Identifier to the Id of the image table.

To upload an image, have an Upload widget somewhere (e.g. in a pop-up window that's triggered when you press some link or button in the Table Records) and handle that so that the uploaded image is stored in the right table. The binary content of the image is in the Upload widget's Content property.
Thanks for your suggestions and advice, but I am going to need some additional steps on how to upload images. 

Joost, I found the online training video, but it is an example of a user uploading excel files.....not for a user uploading images.  I am getting errors with data types.

Killian, I directed my button to go to an an Action to save the image to my table, but my CreateOrUpdate action will not accept the Content property from my Upload widget.  I get an error that states "Entity1 Record data type required instead of Binary Data."  I did set the entity attribute to "Binary Data" on my table.
 
Thanks,
Frank

Frank, an you attach your eSpace? The error message suggest that the data base column is not of type binary data.
We have an IntelliWarp where you can see how to create this
Open help, locate on the left the Designing with IntelliWarp, expand that topic and open the Adding Database images to an Entity topic
Follow the instructions for the wizzard
Once you got it you can replicate the set up even when not using IntelliWarp
Cheers



Frank wrote
:
Thanks for your suggestions and advice, but I am going to need some additional steps on how to upload images. 

Joost, I found the online training video, but it is an example of a user uploading excel files.....not for a user uploading images.  I am getting errors with data types.

Killian, I directed my button to go to an an Action to save the image to my table, but my CreateOrUpdate action will not accept the Content property from my Upload widget.  I get an error that states "Entity1 Record data type required instead of Binary Data."  I did set the entity attribute to "Binary Data" on my table.
 
Thanks,
Frank
 
 
 
Hello Kilian and Rui,

I had to create a record and save my image data to the record and then use the CreateOrUpdate action to store the record.  That was my problem.  After I did this, I was able to store the image as binary data.  With Kilian's advice, I was able to turn around and display the image as well.  Thanks everyone for your help!!!  Could not have done this without you.

Frank
Great news Frank
A word about ajax and uploading of files...
They dont mix ;)
Have fun




Frank wrote
:
Hello Kilian and Rui,

I had to create a record and save my image data to the record and then use the CreateOrUpdate action to store the record.  That was my problem.  After I did this, I was able to store the image as binary data.  With Kilian's advice, I was able to turn around and display the image as well.  Thanks everyone for your help!!!  Could not have done this without you.

Frank
 
 
Ooooh!  Good tip.  I'll keep that in mind.  Thanks!