Title: RE: Witango-Talk: return protected file

I do not have the Content Type and Content Lenth stored in the database either, although I could if necessary. What are the best ways of getting this information?

T.

 

-----Original Message-----
From: Henning Sittler [mailto:[EMAIL PROTECTED]]
Sent: 05 June 2002 03:10 PM
To: Multiple recipients of list witango-talk
Subject: RE: Witango-Talk: return protected file

 

Trevor, this is what Scott Cadillac sent me on the list, and I'm using it now (with the exception that I'm not reading anything about the file from a database, so I get the values for Content-Type, Content-Length, etc from other places.

Try the site Scott mentions below:
http://xml-extra.net/webpage.xmlx?node=38

 

#############

 

Hi Henning,

You are missing a couple of important bits like the 'encodeResults' variable
setting to prevent your binary characters from being converted to HTML
entities and the 'Content-Length' of the download file. Also, I find that
for secure downloads adding the <@userreferencecookie> prevents Witango from
issueing a new UserReference which could break your user session.

<@assign name="encodeResults" scope="local" value="false">
<@assign name="httpHeader"
    scope="local"
    value="Content-Type: <@var
local$resultSet[1,MimeType]><@crlf>Content-Length: <@var
local$resultSet[1,FileSize]><@crlf>Content-Disposition: inline;
filename=<@dq><@var
local$resultSet[1,Filename]><@dq><@crlf><@userreferencecookie><@crlf>">

Then where you do your output, it should look like the following to clean
out any whitespace that Witango will sometimes through in between the HTTP
Header and the content:

<@PURGERESULTS><@VAR local$dlfile ENCODING="NONE">

I wrote a short article about this kind of procedure and there is a sample
file for download.
http://xml-extra.net/webpage.xmlx?node=38

Hope this helps. Cheers...

Scott Cadillac
http://xml-extra.net
[EMAIL PROTECTED]

VP, Research and Development
Plus International Corp.
604-460-1843
[EMAIL PROTECTED]
http://www.plusinternational.com

Vancouver, BC, Canada

Does your company have an Enterprise Information Portal? Check out Salsa at
www.plusinternational.com/flash/salsa.htm

----- Original Message -----
From: "Henning Sittler" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Friday, May 24, 2002 12:00 PM
Subject: Witango-Talk: Contstrained File Downloads

 

> Ok, I tried asking this last week or so, but I'm not sure I ever saw my
own
> post get to the list, nor any replies.
>
> I'd like to offer file downloads without linking directly to an openly
> avialable file.
>
> <@COMMENT>
> <a href=""http://www.thesite.com/files/thefile.zip">Download the file</a>
> This works but won't suit my needs, because anytime can just download the
> file without any validation.
> </@COMMENT>
>
> I'd like to store the file in a non-webserver accessible folder, and
> reference them indirectly through Tango.  The link to download the file
> shown by one taf would point at another taf (opened in a new window let's
> say) which verifies the user is ok to download the file, then reads the
file
> from disk and ouputs only the file.
>
> Given the proper Content-Type headers are output by the second taf before
> outputing the file contents, this should prompt the user to download or
open
> the file, right?
>
> Now all my files will be (or most likely be) .zip, so:
> Content-Type: application/zip
>
> should do it, right?  Well, it's not.  The attached taf's h.taf and i.taf
> illustrate.  They have been kept super minimal for experimentation
purposes.
> Checking procedures and complexity can come once the downloads work.
>
> Also, IE likes to download the taf file instead of the zip file, which I
> understand is a documented IE bug.
>
> Any thoughts?  Thanks much,
>
>
> Henning Sittler
> www.inscriber.com
>
>

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body



Henning Sittler
www.inscriber.com

 

-----Original Message-----
From: Trevor Green [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 8:13 AM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: return protected file

 

Is there a way for Tango to return a file (contents unknown - may be a word doc or an excel file, etc.) from a protected location to a user? The application is such that there would be a directory on the webserver containing files that must not be accessed through a URL but may need to be returned to a user within the application that has rights to view the files. Windows based installation using IE.

Regards
Trevor Green

Reply via email to