On 9/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi,
Hi,
[...]
> How do I get the file path?
You don't have a real "path" since it is in a blob :)
Just create a getfile method that you expose and make it accept an
fileid argument. then return the file payload from this controller and
put src="${tg.url('/getfile?fileid=%s' % file.id)"
or something similar.
Before going down this road, please search for other threads in this
mailing list regarding the hosting of files in the DB.
See also this document: http://docs.turbogears.org/1.0/FileUploadTutorial
If you want to continue with files stored in the DB I suggest you
store the original filename somewhere in the DB in order to give it
back to the client (content-disposition header) so that they don't
have the URL as the filename...
Florent.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---