From mbaiju at zeomega.com Wed Jan 7 07:50:35 2009 From: mbaiju at zeomega.com (Baiju M) Date: Wed, 7 Jan 2009 12:20:35 +0530 (IST) Subject: [Tramline-dev] How to get tramline_id from app server Message-ID: <348714543.1211231311035054.JavaMail.root@mail.zeomega.com> Hi, Can I get the value of "tramline_id" which is set from input filter in my application. I am using Zope 2 as my app server. I tried request.getHeader('tramline_id'), but it's not displaying the value. My intention is to know where physically the files are getting saved. So that I can show it for download. Am I missing something ? What pattern you use for upload and download of files. How app server know where actually files are getting saved. Regards, Baiju M From sylvain at infrae.com Wed Jan 7 10:26:41 2009 From: sylvain at infrae.com (Sylvain Viollon) Date: Wed, 7 Jan 2009 10:26:41 +0100 Subject: [Tramline-dev] How to get tramline_id from app server In-Reply-To: <348714543.1211231311035054.JavaMail.root@mail.zeomega.com> References: <348714543.1211231311035054.JavaMail.root@mail.zeomega.com> Message-ID: <20090107102641.72074ce6@reddwarf.infrae> On Wed, 7 Jan 2009 12:20:35 +0530 (IST) Baiju M wrote: > Hi, Hello, > Can I get the value of "tramline_id" which is set from input > filter in my application. I am using Zope 2 as my app server. > I tried request.getHeader('tramline_id'), but it's not displaying > the value. > The id replace your file. You should check the value of your file, it will be the id. > My intention is to know where physically the files are getting saved. > So that I can show it for download. Am I missing something ? > What pattern you use for upload and download of files. > How app server know where actually files are getting saved. > After you need to configure in your application the tramline PATH (the same you used in Apache configuration) and append it the ID retrieved previously. Best regards, Sylvain, -- Sylvain Viollon -- Infrae t +31 10 243 7051 -- http://infrae.com Hoevestraat 10 3033GC Rotterdam -- The Netherlands -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://codespeak.net/pipermail/tramline-dev/attachments/20090107/93c47d88/attachment.pgp From georges at racinet.fr Wed Jan 7 15:07:55 2009 From: georges at racinet.fr (Racinet Georges) Date: Wed, 7 Jan 2009 15:07:55 +0100 Subject: [Tramline-dev] How to get tramline_id from app server In-Reply-To: <20090107102641.72074ce6@reddwarf.infrae> References: <348714543.1211231311035054.JavaMail.root@mail.zeomega.com> <20090107102641.72074ce6@reddwarf.infrae> Message-ID: <566E7302-C584-4C3F-8D2E-2DE0ED97AD9F@racinet.fr> On Jan 7, 2009, at 10:26 AM, Sylvain Viollon wrote: > On Wed, 7 Jan 2009 12:20:35 +0530 (IST) > Baiju M wrote: > >> Hi, > > Hello, > >> Can I get the value of "tramline_id" which is set from input >> filter in my application. I am using Zope 2 as my app server. >> I tried request.getHeader('tramline_id'), but it's not displaying >> the value. >> Yes, it seems that Zope 2 does some filtering on headers, sadly. > > The id replace your file. You should check the value of your file, > it will be the id. For completeness, I'd like to add that the "tramline_id" header value is some internal id used by tramline for another purpose (Processor object id, instead of file id). The header to check for if possible is "tramline". If an app can't check it, then it has to have some prior knowledge that tramline did intercept the file. This is what attramline (IIRC) and CPSTramline do. > > >> My intention is to know where physically the files are getting saved. >> So that I can show it for download. Am I missing something ? >> What pattern you use for upload and download of files. >> How app server know where actually files are getting saved. >> > > After you need to configure in your application the tramline PATH > (the same you used in Apache configuration) and append it the ID > retrieved previously. You also have to be aware that this is knowledge of tramline internals. Something I've asked to change at some point, by the way, for performance on big repositories. In principle, if your purpose is simply to serve the file, you don't need to know this, all you have to do is to set a "tramline_file" header in the response. Now if you want to display more info about the file in your app (size, multimedia tags, whatever), you can't avoid using this knowledge. Regards, -- Georges Racinet Zope/CPS/Plone expertise & assistance