Hi all,

I have a turbogears app, and I want to run it behind apache SSL. Now
the (simplified) code to upload a file is as follows:
--------------------------------------------------------------------------------
@expose()
@identity.require(identity.in_group("users"))
def attach(self, upload_file, item_id, **kw):
    fn = re.split(r"[\\/]", upload_file.filename)[-1]

    target_file_name = os.path.join(os.getcwd(),
config.get("upload.dir"), fn)
    url = "./static/uploads/%s" % fn

    f = open(target_file_name, 'wb')
    bytes = upload_file.file.read(1024)

    while bytes:
        f.write(bytes)
        bytes = upload_file.file.read(1024)

    f.close()

    redirect("/idea", redirect_params={'id': item_id})

--------------------------------------------------------------------------------

This works nicely when going through the http protocol, but as soon as
I switch to SSL, upload_file is being passed in to the attach method
as None. The rest of the site works fine over https, just not the file
upload.

Has anyone come across this before? Or if not, does anyone have any
insight into the possible cause?

Thanks,

--
Ant...

http://antroy.blogspot.com/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to