Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2005, 05:34 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You don't need a component for downloading files; all you need is a link to the file; e.g.:

<a href="YourFile.doc">Download Now</a>

If you want to stream files from a different location (not located under the web root) to the client, take a look at this FAQ:

http://Imar.Spaanjaars.Com/QuickDocId.aspx?QUICKDOC=189

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 9th, 2005, 07:31 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

thank you.it meanse i just put a link to my file and this file can be in any format.it seems so easy.thank you.i was really confused.
thank you again and wish you very best wishes

 
Old July 9th, 2005, 08:24 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, you can do that with any file type. However, some files are opened by the browser, instead of saved to disk. For example, .html, .doc and .xls files are usually opened inside the browser. This is a client (browser) setting that you cannot change remotely.
The article I linked to earlier presents a solution to force the Save As dialog, regardless of the document type and client settings.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 11th, 2005, 02:57 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

another question(i think my questions get you board and i'm really appologize) when i want to download files in the second page there is some where that i should put the save path the code is as below:
Count = Upload.Save("c:\upload")
is it usefull at web???? and if not wich path i should set for it??
thank you again
you've helped me very much

 
Old July 12th, 2005, 01:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If you want your users to be able to download the files again, and you don't want to "stream" the files as explained in the FAQ I linked to earlier, you should save your files somewhere under the web root folder (usually somewhere under Inetpub\wwwroot).

The IIS account needs write permissions to be able to write to that folder. This FAQ shows you how to configure your system for that: http://imar.spaanjaars.com/QuickDocId.aspx?QUICKDOC=290

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Hangin Tree by Queens of the Stone Age (Track 8 from the album: Songs For The Deaf) What's This?
 
Old July 17th, 2005, 12:59 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

thank you for your link.i've used it and it was working.i've tried diffrent ways to give address for my uploading places but it didn't work.
i change the code to this sample:
Count = Upload.Save("inetpub\wwwroot\upload")
or
Count = Upload.Save("wwwroot\upload")
or
Count = Upload.Save("upload")
and for all of these i get below error:
Error Type:
Persits.Upload.1 (0x800A003D)
Wrong Content-Type. Make sure you have included the attribute ENCTYPE="multipart/form-data" in your form.
/newfolder/Uploadcompressor.asp, line 58

did i give the address in wrong way or i should change the other code?


 
Old July 17th, 2005, 03:37 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Your path is incomplete; you need to provide a drive letter as well. E.g.:

Count = Upload.Save("C:\inetpub\wwwroot\upload")

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 17th, 2005, 04:54 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

i tried this way of addressing but it didn't work.even i copy and paste your code and put it in my programes but it didn't work.it just accept c:\upload path address.

 
Old July 17th, 2005, 04:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you define "didn't work"?? And did you read the FAQ that explains how to set the necessary security permissions on the C:\inetpub\wwwroot\upload folder? For what user account did you change those security settings??

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 18th, 2005, 03:35 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

i did every thing as you said and it is don now.thank you so muxh.but there is another thing and that's it:when i want to use it on the net(i mean internet) the address should be something like this?
http://otc-ir.com/public/upload






Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading a file with ASP BananaJim Classic ASP Professional 1 December 7th, 2006 06:57 PM
uploading word with asp hastikeyvan Classic ASP Basics 0 July 6th, 2005 12:19 AM
Uploading asp files robbo Classic ASP Basics 2 January 19th, 2004 03:33 AM
Uploading Word to Access database jenty_c Pro JSP 0 January 11th, 2004 01:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.