Solved

example SaveAsVirtual  & SaveVirtual

Posted on 2004-08-30
4
564 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

12 Experts available now in Live!

Get 1:1 Help Now