Re: use of save_FOO_file

2007-06-04 Thread Ulf Dambacher
Hi Franchesco There is a patch for newforms using the fileInput widget correctly. there you can find it: When the browser has presented it's File dialog and the form is submitted with a file selected, the raw contents of the file is appended to the post request (you have to set the encoding

Re: use of save_FOO_file

2007-06-03 Thread sansmojo
Well, I'm really not sure what you've got going on. You definitely need enctype="multipart/form-data" for it to work. Have you tried saving a file in the default admin for the model? If so, does it work as expected? If not, maybe you have MEDIA_ROOT set wrong. Also try simplifying your form

Re: use of save_FOO_file

2007-06-03 Thread cesco
On Jun 3, 6:52 pm, sansmojo <[EMAIL PROTECTED]> wrote: > The raw, binary data of the file. After uploading, it ends up at > request.FILES['file']['content'] (where 'file' is the name of your > form field). > > An example: > > if request.FILES.has_key('file'): > new_file =

Re: use of save_FOO_file

2007-06-03 Thread sansmojo
The raw, binary data of the file. After uploading, it ends up at request.FILES['file']['content'] (where 'file' is the name of your form field). An example: if request.FILES.has_key('file'): new_file = File(some_field='some_val', date_uploaded=datetime.now())

use of save_FOO_file

2007-06-03 Thread cesco
In the following method available for FileFields: save_FOO_file(filename, raw_contents) what does "raw_contents" represents? I didn't find any example on the web about it. Many thanks Francesco --~--~-~--~~~---~--~~ You received this message because you are