How can i store images in database?

Showing Answers 1 - 13 of 13 Answers

Ji Zhang

  • Jul 6th, 2007
 

In practice for MySQL,  the images can be stored onto hard dirve directly, and the path is stored as string in mysql,

  Was this answer useful?  Yes

Images need to be browsed through form (need to use enctype as multipart form data), then take the contents of file into a variable and insert using mysql query. ensure that you don't try to post a file into a field larger than allowed size in your my.cnf, use blobs for storing data.

  Was this answer useful?  Yes

mzeeshan

  • Jun 25th, 2010
 

We can store images and videos as well by converting the picture or audio/video into  the byte array using C#/ VB and store it in a database as binary file (set the type of the field as binary).
because at the end every file is a binary so if you store it as binary it will definitely works!

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions