Hello all, Hello Ian

I want to give some feedback on the fresh documentation that is located here:

http://docs.turbogears.org/1.0/FileUploadProgressBar

I have already posted in the general TG list but (to my shame) I was
so unclear about what I wanted to say that even I cannot really read
my own post again :(

So,

The first point was about the listing concerning the filter for cherrypy.
This  listing references the cherrypy module without importing it and
the string supplied to the append() method did not work for me.
I just listed what worked for me below and I think it may be generic
enough since I just quickstarted a new project for testing purposes.

Filter setup listing:
-------------------------
import cherrypy
# Add the UploadFilter filter to cherrypy.
cherrypy.filters.input_filters.append('filedrop.uploadfilter.UploadFilter')
cherrypy.filters.output_filters.append('filedrop.uploadfilter.UploadFilter')
-------------------------

Notice the 'firedrop.' that was added before 'uploadfilter.UploadFilter'.

The second point I encountered was a missing method for the root
controller named "sanitize_filename" that is called by the
"get_upload_stats" method.

I coded a small replacement for it that follows:

-------------------------
def sanitize_filename(self, filename):
   """ strip garbage from given filename argument """
   return os.path.basename(filename)
-------------------------

I have no idea if it does the job in all situations but it seems to
work for me in a simple test...

I hope this post is more clear that the others and pray no one notices
the others :)

Best regards,

Florent.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Docs" 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-docs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to