Solved

example SaveAsVirtual  & SaveVirtual

Posted on 2004-08-30
4
567 Views
Last Modified: 2008-01-09
Dear All,

Can anybody quote examples for  SaveAsVirtual  & SaveVirtual using ASPUPLOAD component as .save method is disabled by hosting administrator.

Regards,

0
Comment
Question by:gulfexpert
4 Comments
 
LVL 6

Expert Comment

by:casstd
ID: 11929388
Hi,

         Using aspupload you can only use their method to upload file. Did you try to upload the files? The following code will help you. But you must have write permission to upload file to a folder.

I am not sure about whether the adminstrater can disable a .save method or not.

Set Upload = Server.CreateObject("Persits.Upload.1")
uploaddir = "DOCS"                                          
UPLOADDIRECTORY = Server.MapPath(uploaddir)                  
Upload.OverwriteFiles = true
                  
Count = Upload.Save(UPLOADDIRECTORY)          'if count is 1 then the file is uploaded to the folder
Set File = Upload.Files("File1")
If Not File Is Nothing Then                  
      Filename = File.ExtractFilename
      Ext = UCase(Right(File.Path, 3))
      size = File.size
else
      Filename = ""
End If
            
            

0
 
LVL 22

Accepted Solution

by:
neeraj523 earned 125 total points
ID: 11929390
Hello

SaveAsVirtual method of ASPUPLOAD will alow you to save your file at virtual path without..

example..

say your web root is

c:\inetpub\wwwroot\myWeb

now you want to save your uploaded file at a location say

c:\inetpub\wwwroot\myWeb\myUploads

than you need to code it like this

<%
File.SaveAsVirtual "/myUploads/" & File.FileName
%>

neeraj523
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now