download URLs for FileField should end with filename not fieldname
Tom Lazar
lists at tomster.org
Mon Nov 12 15:37:34 UTC 2007
thanks encolpe,
however, i don't fully understand:
On Nov 12, 2007, at 2:48 PM, Encolpe Degoute wrote:
> If you can suppose that you never have two times the same filename
> used
> in a single document,
yes, that's the case
> you can iterate on schema and use
> FileField.getFilename(self, instance, fromBaseUnit=True) to detect if
> you're using the good field...
i already know how to retrieve the filename of the uploaded file, i
want to know how it is possible to use it in a url so that the file is
returned when somebody uses such an url.
i.e. instead of
http://nohost/plone/foo/filedata
i want to be able to use
http://nohost/plone/foo/bar.tgz
for download.
also, what do you mean by 'to detect if you're using the good field'?
thanks again,
tom
>
> There's other issues:
> - you must do this in a tool or in an utility as many methods you will
> use are private
> - iterations will slow down your site
> - filename must be unique in a content type
>
>
> --
> Encolpe Degoute
> INGENIWEB (TM) - S.A.S 50000 Euros - RC B 438 725 632
> 17 rue Louise Michel - 92300 Levallois Perret - France
> web : www.ingeniweb.com - « les Services Web Ingénieux »
> Tel : 01.78.15.24.08 / Fax : 01 47 57 39 14
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers
>
More information about the Product-Developers
mailing list