List:General Discussion« Previous MessageNext Message »
From:Michael Dykman Date:March 28 2008 3:42pm
Subject:Re: Adding Images
View as plain text  
Victor,

you are on the wrong list.  Your problem is not a MySQL problem (at
least, not yet) but a question of how python deals with uploaded files
(which, in ANY environment is radically different than the way normal
form elements are treated).  Try the python groups.

 - michael dykman

On Fri, Mar 28, 2008 at 11:35 AM, Victor Subervi
<victorsubervi@stripped> wrote:
> Hi;
>  I´m trying to figure out how to upload images into a MySQL database. (Yes,
>  that is what I want to do.) I have a form that asks for data, like this:
>
>  1ra Foto Pequeña:
>  <input type='file' name='pic1' />
>
>  Then I send that form to a python script that processes like this:
>
>  cursor.execute('insert into products (' + col_names + ') values (' +
>  col_values + ');')
>
>  where col_names is all the names of the columns and col_values, obviously,
>  the values. Works fine for strings and digits. Not so well for files :) What
>  do?
>  TIA,
>  Victor
>



-- 
 - michael dykman
 - mdykman@stripped

 - All models are wrong. Some models are useful.
Thread
Adding ImagesVictor Subervi28 Mar
  • Re: Adding ImagesMichael Dykman28 Mar
  • Re: Adding ImagesDan Nelson28 Mar