I'm using Pylons to upload an image and store it to disk:
<form method="post">
<input type="file" name="picture" enctype="multipart/form-data" />
</form>
Then in my controller:
if 'picture' in request.POST:
i = ImageHandler()
#Returns full path of image file
picture_file = i.makePath()
shutil.copyfileobj(request.POST['picture'],picture_file)
But I receive the error: AttributeError: 'unicode' object has no attribute 'read'
What's going on here? Thanks for your help.