473,322 Members | 1,241 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,322 software developers and data experts.

ASP Force Download of file from webserver

Hi All

I am creating an asp application which is essentially a file management app.

I am trying to get my head around a technically issue wonder if someone can
offer some help.

I want to be able to force the download of the files are attached to a
particular record.

The code which i use to force the download is

<%
strPath = "C:\MyFiles"
Set Upload = Server.CreateObject("Persits.Upload")
' Build path to file
strPath = uploadfilepathactual
Path = strPath & "\" & strFileName
Upload.SendBinary Path, True, "application/octet-binary", True
%>

I want to be able to change the path to say something like

strPath = \\servername\c$\myfiles

Is the above possible. Any other alternatives.

Regards
Jas
Jul 22 '05 #1
2 4449
I'm not sure how your upload thing is relating to forcing a download or how
the UNC path is tying in here. What are you trying to do?

Ray at work

"JP SIngh" <no**@none.com> wrote in message
news:eo**************@tk2msftngp13.phx.gbl...
Hi All

I am creating an asp application which is essentially a file management app.
I am trying to get my head around a technically issue wonder if someone can offer some help.

I want to be able to force the download of the files are attached to a
particular record.

The code which i use to force the download is

<%
strPath = "C:\MyFiles"
Set Upload = Server.CreateObject("Persits.Upload")
' Build path to file
strPath = uploadfilepathactual
Path = strPath & "\" & strFileName
Upload.SendBinary Path, True, "application/octet-binary", True
%>

I want to be able to change the path to say something like

strPath = \\servername\c$\myfiles

Is the above possible. Any other alternatives.

Regards
Jas

Jul 22 '05 #2
You could put the file in a zip file or perhaps check this out:

How do I prompt a "Save As" dialog for an accepted mime type?
http://www.aspfaq.com/show.asp?id=2161

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #3

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

Similar topics

2
by: Matthew Sims | last post by:
Is it possible to force a download without using the readfile function? My website setup consists of my server that serves the web pages plus a high-speed file server elsewhere on the internet...
2
by: Yann.K | last post by:
Hello. I have a directory with many files (and dir). In this directory, i have a inde.php file wich display all the file to download. I would like to force the users who come in this directory...
4
by: dspohn | last post by:
I am designing a document management system (DMS). The files are stored in a directory on the webserver. The filenames for the documents are stored in a MySQL database. The DMS will track...
4
by: Kevin Muenzler, WB5RUE | last post by:
How do I force a browser to download a file instead of displaying it? In other words I have a page with MP3 and WMA files on it and I would like for the visitor to download the file instead of...
4
by: tma | last post by:
Short of zipping my file, are there any other alternatives to the below? I'm trying to add anchors in code and I need the link to force a download of the .pdf rather than open a new window or...
6
by: Jatin | last post by:
Hey Guys I have a web application that allows users to download files. But the files are not hosted on the webserver. The files are stored on external servers and are referenced by a URL/URI....
0
by: comp.lang.php | last post by:
I have a form that when you click the "Generate Report" submit button, it will force download a CSV file, required for this project. On the very same page you also have a "Search" submit button,...
2
by: comp.lang.php | last post by:
class ReportGenerator { function ReportGenerator() {} /** * Generate the HTTP headers necessary for this file type. Can be called statically *
0
by: jinnareddy | last post by:
Hi, I'm unable to download a file that is having a 2-byte char in its name (e.g.テ) using force download option. Though, am able to download file names involving ASCII chars. I have tried URL...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.