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 p
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 t
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 = File(some_field='som
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())
new_file.save_file_file(req
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 sub
5 matches
Mail list logo