473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

SA-FileUp Secure Download Issue - Please HELP!

Hi Everyone,

I was wondering if anyone has ever successfully used SA-FileUp's download
feature. I am being forced to change from
"ASPSmartUpload" as the server I am moving everything to is using SAFileUp
version 3.2.
I ran through their documentation and found a section called "secure
download", unfortunately, their examples do not work
at all!
On Netscape 7, the file "pretends" to download (after changing the file
extension), but only an empty file is created.
On IE 6, I simply get an Internal Server Error (when calling the
TransferFile method of my object).

Here is the code (verbatim from the documentation):

Set oFileUp = Server.CreateObject("SoftArtisans.FileUp")
Response.ContentType = "application/x-msdownload"
Response.AddHeader "Content-Disposition", "attachment;FileName=""" &
FileName & """"
oFileUp.TransferFile FilePath

I also tried:

Set oFileUp = Server.CreateObject("SoftArtisans.FileUp")
Response.ContentType = "application/x-msdownload"
Response.AddHeader "Content-Disposition", "attachment;FileName=""" &
FileName & """"
Set oFM = Server.CreateObject("SoftArtisans.FileManager")
Set oFile = oFM.GetFile(FilePath)
Response.AddHeader "Content-Size", oFile.Size
oFileUp.TransferFile FilePath

(where I retrieve get the file size)

In ASPSmartUpload, I have no trouble what-so-ever with ANY browser I try
using their download feature.
I use the download feature to grab a file that cannot be accessed via a URI,
so simply using the URI is not an option.

I checked and rechecked my variables "FilePath" and "FileName" and they are
exactly correct (if they weren't, I suppose I would have had an error!).
FilePath="e:\securefiles\" and FileName="testfile.zip"
I also monkeyed around with just about every MIME type their is with the
same results.

Here are the specs:
Server: W2K Server SP4
IIS: version 5.0

Anyway, I would just like to simply see an actual, working and tested
example for IE6, NN7.x, and Opera 6 + with
IIS version 5 running on Win2000 Server SP4.

Thanks!

Dave
Jul 19 '05 #1
1 7170
Answering my own question:

With the exception of Netscape 7 not automatically determining MIME type
(I'll have to put a browser test in for this version),
I have rewritten the code. I have discovered that they had FilePath where
they should have had FullPath. The order in which
object instantiation is also critical. After some experimentation, I have
come up with the following working and tested code:
Note: "FullPath" is something like "d:\myfolder\securefiles\myfile.arj" -
that is the entire tree including the file name.
'create instance of the SA FileManager
Set oFM = Server.CreateObject("SoftArtisans.FileManager")

'create instance of a file object
Set oFile = oFM.GetFile(FullPath)

' this header allows the download box to indicate size and bytes left
Response.AddHeader "Content-Size", oFile.Size

'this sets the MIME type to one that most browsers can use (necessary for IE
5.x) - forces dialog
Response.ContentType = "application/x-msdownload"

set oFile = nothing
set oFM = nothing

'create this object instance last
Set oFileUp = Server.CreateObject("SoftArtisans.FileUp")

'ensures the correct file name will show up in the save as dialog
Response.AddHeader "Content-Disposition", "attachment;FileName=""" &
FileName & """"

'does the actual xfer
oFileUp.TransferFile FullPath

'clean up
set oFileUp = nothing
I hope this is useful to someone else besides me and saves someone lots of
headaches.

Sin.
Dave

-@^@-
(_)
~__~
'''

"Dave" <dave[removethis]@miraclecat.com> wrote in message
news:3f**********@news.iglou.com...
Hi Everyone,

I was wondering if anyone has ever successfully used SA-FileUp's download
feature. I am being forced to change from
"ASPSmartUpload" as the server I am moving everything to is using SAFileUp version 3.2.
I ran through their documentation and found a section called "secure
download", unfortunately, their examples do not work
at all!
On Netscape 7, the file "pretends" to download (after changing the file
extension), but only an empty file is created.
On IE 6, I simply get an Internal Server Error (when calling the
TransferFile method of my object).

Here is the code (verbatim from the documentation):

Set oFileUp = Server.CreateObject("SoftArtisans.FileUp")
Response.ContentType = "application/x-msdownload"
Response.AddHeader "Content-Disposition", "attachment;FileName=""" &
FileName & """"
oFileUp.TransferFile FilePath

I also tried:

Set oFileUp = Server.CreateObject("SoftArtisans.FileUp")
Response.ContentType = "application/x-msdownload"
Response.AddHeader "Content-Disposition", "attachment;FileName=""" &
FileName & """"
Set oFM = Server.CreateObject("SoftArtisans.FileManager")
Set oFile = oFM.GetFile(FilePath)
Response.AddHeader "Content-Size", oFile.Size
oFileUp.TransferFile FilePath

(where I retrieve get the file size)

In ASPSmartUpload, I have no trouble what-so-ever with ANY browser I try
using their download feature.
I use the download feature to grab a file that cannot be accessed via a URI, so simply using the URI is not an option.

I checked and rechecked my variables "FilePath" and "FileName" and they are exactly correct (if they weren't, I suppose I would have had an error!).
FilePath="e:\securefiles\" and FileName="testfile.zip"
I also monkeyed around with just about every MIME type their is with the
same results.

Here are the specs:
Server: W2K Server SP4
IIS: version 5.0

Anyway, I would just like to simply see an actual, working and tested
example for IE6, NN7.x, and Opera 6 + with
IIS version 5 running on Win2000 Server SP4.

Thanks!

Dave

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: JIMMIE WHITAKER | last post by:
Can someone help on this: I am just learning, and I'm connecting to the the northwindcs.mdf tables / open file is northwindcs.adp. This is the sample installed using msde, which is supposed to be...
2
by: HazBin | last post by:
Folks, Sorry 'bout this. I'm sure it must be an FAQ, but I can't find the answer after many hours of looking :-( I don't know the SA password any more. Is there a mechanism for setting (or...
1
by: patrickshroads | last post by:
I just started a new job and no one seems to know the SA password. Here's my plan to change it: 1. I've run a trace for a couple of days to verify that there are no jobs or processes that are...
2
by: googlemike | last post by:
On the latest SQL 6.5 with the latest SQL 6.5 service pack, what's the trick to creating an account besides sa that has the power to create databases? I was thinking of calling this account 'sa2'....
1
by: liorhal | last post by:
is there a difference in the previleges of 'sa' login and other login with 'sysadmin' role (and 'db_owner' for all databases) ? can they do the exact same things ?
8
by: oaksong | last post by:
I had a web page that worked very nicely until I changed the SA password. The page used data widgets for connectivity to SQL server. I changed the password in the Server Explorer link, but the...
2
by: Les Caudle | last post by:
I un-installed SQL 2000 developer's edition and installed SQL 2005 developer's edition in mixed mode security with the exact same sa password. I then attached my old databases. Even thought...
4
by: BD | last post by:
Hi all. Running SQL2K SP4 on W2K3 Standard, SP4. I have just refreshed a database on one server with a backup from another. The database had existed previously on the target server, and I am...
2
by: Bill E. | last post by:
We have renamed the 'sa' account on a SQL Server 2005 machine. When we run SELECT * FROM syslogins it appears that 'sa' no longer exists as a valid SQL login. However, when we look at...
3
by: =?Utf-8?B?Ri5OLlo=?= | last post by:
I want to install SQL express edition on a laptop with vista home basic, but I faced a lot of problems.I have this error: SQL Setup could not connect to the database service for server...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.