Hi guys,

I can not get the Uploadifyer :-(
I still do not get the picture.

I have the followings that seem OK:
1. myproject.template.upload
2. import myproject.model.widgets.uploadfiles import upload_fieldset

I have problem with the controllers and the code handling the uploads.
I guess that the idea is that the file upload should be handled by a separate controller. E.g. http:/host/myproject/upload

class UploadController:
        ...

class RootController
        ...
        upload=UploadController()

---------------
I do not understand why the upload page is realized at the class-level in the UploadController (see the code from the docs below). And why not as a function of the UploadController. Or why not as a function of the RootController?

I do not understand where the script "foobarbaz" (that handles the file uploads) should be created. If I define it in the UploadController, I get the "No controller-wide authorization at ...". I have the feeling that the file-handling-script (foobarbaz) should be defined at the controller level. But what does that mean?

---------------
Moreover, this piece code of UploadController (from the docs) gives an error: SyntaxError: invalid syntax (root.py, line 25)
???

class UploadController(BaseController):

    @expose('qpcr.templates.upload')
    params = { 'child_args' : {       #THIS IS LINE 25
                'upload_file': dict(script="foobarbaz"),
                }
              }
    tmpl_context.file_form = upload_fieldset
    return dict(params=params)

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

Many thanks in advance!
tamas

Alessandro Molina wrote:
On Fri, Jun 3, 2011 at 4:10 PM, Tamas Hegedus <[email protected]> wrote:
Thanks a lot!

My problem is that you can not store (pickle) file objects in the session
variable.

I could create non-temporary files and store their absolute path.
And remove files after the session expires. Still do not feel that this is
the best (most elegant) solution. :-)


You might store them in a redis value with an expire time.
You would have them accessible from anywhere and they would disappear
after the time you decide freeing up your space.


--
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