Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

example SaveAsVirtual  & SaveVirtual

Posted on 2004-08-30
4
Medium Priority
?
576 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 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

618 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