[Product-Developers] Getting filename from FileField in custom AT content type
kaeru at inigo-tech.com
Mon Jan 19 04:07:41 UTC 2009
On Fri, 2009-01-16 at 13:14 +0800, Khairil Yusof wrote:
> I have an AT type with a FileField called attachment1 with an uploaded
> Getting MIMETypes is ok.
> but the following returns None,
> It shows up ok in ZPT (accessor/filename) but I can't seem to access it
> via python.
> I'm probably missing something obvious here, but can somebody help point
> to me where this value is is stored and how do I access it?
Doing a dir(obj.attachment1) shows it has attribute filename. This will
do it, in unlikely case somebody stumbles onto this problem:
filename = obj.attachment1.filename
More information about the Product-Developers