insert image in SQL db

insert image in SQL db

  

hi,

  I need to insert images in mysql database table.my images are stored in my local disk.i am using LOAD_FILE() for insert but it only stores the path not an image..

if it is not possible to insert from local disk means from where can i get my images.please give me a solution with what are the resources i need to store my images into the database.

                                                            thank you

Hi Chandru,

To save an image in the database you need:

1. An entity with an attribute of the data type 'Binary Data'
2. A web screen with the Upload Widget (to select the image file) and a button\link to run a screen action that will save the image to the database. The button\link on click method must be Submit and not Ajax Submit.
3. On the screen action, assign the content from the Upload Widget to your entity record and save it.   

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Chandru,

To save an image in the database you need:

1. An entity with an attribute of the data type 'Binary Data'
2. A web screen with the Upload Widget (to select the image file) and a button\link to run a screen action that will save the image to the database. The button\link on click method must be Submit and not Ajax Submit.
3. On the screen action, assign the content from the Upload Widget to your entity record and save it.   

Regards,

Daniel

thank you for your reply sir. 

     but i need to insert it into a table which is placed in my database.

   thank you




Hi,

What about creating a extension to connect to your MySQL database.

That way your database table is available as entity in OutSystems, and you will have all the beneifits of low-code.

See for more info:

https://success.outsystems.com/Documentation/10/Extensibility_and_Integration/Integrate_with_an_External_Database

https://success.outsystems.com/Documentation/10/Reference/Configuration_Tool/Database_Tab/Database_Tab_in_MySQL

https://success.outsystems.com/Evaluation/Integration/02_Use_OutSystems_with_existing_databases


Regards,

Daniel