I have a form that I'm using to upload a file. All seems to be in
order, but when I look at the newly copied file it's all skewed and the
colors are all wierd.

Here is the code I'm using to handle the file upload, Any ideas? :

if 'big_image' in request.params:
            f = request.params['big_image']
            try:
                newFileName = "%s_%s" % (prod_id,f.filename)
                newPath = os.path.join(ipath,newFileName)
                nf = open(newPath,'w')
                shutil.copyfileobj(f.file,nf,1024)
                nf.close()
                return Response("new file %s written" % newPath)
            except Exception, e:
                return Response(str(e))

I'm using the latest SVN checkout of pylons as of today.

Thanks,
Mike


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to