Trigger open/download of file object via script
How do I trigger open/download of file object, whose id have had their .filename extensions removed? My file objects (that have been uploaded into zope via a form) are not given Id's that are the same as their original filename (cos of possible duplicate filename & other issues), thus clicking on a hyperlink genjerated with zope code like this: <a href="&dtml-absolute_url;"><dtml-var id></a> ain't gonna trigger a open/download dialog box (cos IE sees no file extension is present, I guess) Note that I *do* keep the original filename with extension - as the *title* of the file object (rather than as its Id) ) e.g. file01 has a title "fred.doc" e.g. file02 has a title "another letter re news.doc" EXAMPLE WHAT I WANT: I want to be able to click on a hyper link entry for say, "file02" and get a open/download dialog box prompting me to save/open that zope object as "another letter re news.doc" thanks for any help on this, -Andy Bulka
1st make sure you use File objects. 2nd make sure content type is set properly. For word documents it should be(without quotes): "application/msword". That will tell IE to download it instead of view it Yours in Service, Curtis W. Ruck -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Andy Bulka Sent: Sunday, September 16, 2001 10:24 PM To: Zope egroups List Subject: [Zope] Trigger open/download of file object via script How do I trigger open/download of file object, whose id have had their .filename extensions removed? My file objects (that have been uploaded into zope via a form) are not given Id's that are the same as their original filename (cos of possible duplicate filename & other issues), thus clicking on a hyperlink genjerated with zope code like this: <a href="&dtml-absolute_url;"><dtml-var id></a> ain't gonna trigger a open/download dialog box (cos IE sees no file extension is present, I guess) Note that I *do* keep the original filename with extension - as the *title* of the file object (rather than as its Id) ) e.g. file01 has a title "fred.doc" e.g. file02 has a title "another letter re news.doc" EXAMPLE WHAT I WANT: I want to be able to click on a hyper link entry for say, "file02" and get a open/download dialog box prompting me to save/open that zope object as "another letter re news.doc" thanks for any help on this, -Andy Bulka _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Andy Bulka -
Curtis Ruck