Solved

example SaveAsVirtual  & SaveVirtual

Posted on 2004-08-30
4
572 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Query not working correctly? (or how i want it to... 6 54
Issues with Insert statement 12 31
Downside of adding characters set in ASP pages 6 37
Table header must be on top 2 31
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

696 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