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 18th, 2005, 03:58 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

No, even on your remote host you should use something like "C:\Inetpub\wwwroot\Upload"

It may be a remote host for you, but from the server's point of view, the disk the file must be saved to is local, hence you use a local path.

If you don't know the exact physical location of the folder, use something like

myFolder = Server.MapPath("/Uploads")

to translate a virtual path into a physical path. Then use myFolder to save the file, e.g.:

Upload.Save(myFolder & myFileName)

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Glass Eye by Ed Rush & Optical (Track 5 from the album: Wormhole #1) What's This?
 
Old July 18th, 2005, 10:51 PM
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

so how do i know that there is a folder with this name in the pisical path of the server or no?and then when i want to download these uploaded items where should i link them?because i don't know where is my files.and should i write my files name in upload.save sentences?

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

This should all be in the upload control's documentation. Do you have a copy of the docs for this control? If not, I suggest you do get a copy and read a bit. It may speed up this project.

Anyway, you can use the FileSystemObject (FS) to see if a folder exists using FolderExists. If necessary, you can create the folder before you allow the upload. Search Google for FileSystemObject and FolderExists for some useful results.

Let's say you have a domain like www.yourdomain.com. With your ISP, this may map to C:\inetpub\wwwroot\Customers\hastikeyvan

When you create a folder called Uploads (using FTP for example), the folder is accessible as http://www.yourdomain.com/Uploads
When you use Server.MapPath("/Uploads") to get the physical location of the Uploads folder in the root of your site you get C:\inetpub\wwwroot\Customers\hastikeyvan\Uploads

So, in that folder you can store the files, which can then be downloaded from http://www.yourdomain.com/Uploads


Does this help??

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Dozer by Ed Rush & Optical (Track 9 from the album: Wormhole #1) What's This?
 
Old July 19th, 2005, 05:10 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'm searching for filesystemobject and i find something abou it.cant i creat a folder myself without using these files?would you please introduce me a website that i can read more about fso ?
thank you

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

Where did you search and what articles did you read??

If you search Google with the terms I mentioned, the fourth result is this:

http://msdn.microsoft.com/library/de...lderexists.asp

with a tree on the left with various methods of the FSO object like CreateFolder.

This page also brings you here: http://msdn.microsoft.com/library/en...filesystem.asp

with about all the information about the FSO you can possible want....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Walking On The Sidewalks by Queens of the Stone Age (Track 4 from the album: Queens of the Stone Age) What's This?
 
Old July 20th, 2005, 06:13 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 read that items to told me and read a book about fso.i get information about it.but where should i use it?when i want to download files i should use it to tell users if the file was exist or no? i can't understand where is the usage of fso.would you please tell me where should i use it?(i'm look silly yes?:">:()

 
Old July 20th, 2005, 06:16 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 got it:D excuse me if i was so silly.thank you for your very very useful guidance.

 
Old July 20th, 2005, 10:58 PM
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

what do you mean by upload documentation?i don't what is it and where i can find it.

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

I also don't know exactly what it is and where to find it because I don't know what control you're using ;)

However, often when you either purchase a commercial component or download a free one, some form of documentation is supplied. This documentation also provides examples showing you how to accomplish tasks like saving a file to disk.

Check the web site where you downloaded the component from.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 22nd, 2005, 10:55 PM
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 have my upload documentation.you mean i can find fso in those documents?
i have its copy.





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.