Image Upload with FalconFramework

Mark Lawrence breamoreboy at yahoo.co.uk
Thu Jul 3 03:06:13 EDT 2014


On 03/07/2014 04:54, Peter Romfeld wrote:
> Hi,
>
> I am stuck at a simple image upload function, in django i just used:
>
> for feature phones:
> file = request.body
>
> iOS with Form:
> class ImageForm(forms.Form):
>      image = forms.FileField()

What is forms?  image is defined at the class level, not the instance 
level, did you actually mean that?

> form = ImageForm(request.POST, request.FILES)
> file = request.FILES['image'].read()

file has been overwritten.

>
> with falcon i tried but not working;
> req.stream.read()

req is undefined here.

>
> Cheers,
> Peter
>

So please give us your OS and Python versions, the exact code that 
you've tried to run, how you've tried to run it, what you expected to 
happen and what actually happened including the complete traceback if any.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com





More information about the Python-list mailing list