PATH not a valid virtual path - trying to upload files to a URL

Last post 05-18-2010, 8:29 PM by cutechat. 3 replies.
Sort Posts: Previous Next
  •  05-18-2010, 8:52 AM 61100

    PATH not a valid virtual path - trying to upload files to a URL

    Hi there,
     
    I have been tasked with creating an application which will run on a Rackspace Cloud server. The images must be saved to a location such as http://images.myserver.com and will be required to create folders there if neccessary. As such, a DOS path (eg. c:/images/") or UNC path (eg. \\server01\images\) cannot be used
     
    I have been unable to upload files to even my local machine using the URL naming instead of a path like "c:\images" or UNC like \\images\upload
     
    Please can you help me to upload files with Ajaxuploader to a URL destination, e.g. http://images.myserver.com The code fails at the line 
    args.CopyTo(imgPath + "/" + FileName) with error 'http://win7/hires/9999/19570/Xlarge/NatashaLeis1.JPG' is not a valid virtual path
     
    If I paste into the browser   'http://win7/hires/9999/19570/Xlarge/' it is found.
     
    Thanks in advance
     
    Rob Nagel
  •  05-18-2010, 10:41 AM 61108 in reply to 61100

    Re: PATH not a valid virtual path - trying to upload files to a URL

    Rob,
     
    ASP Uploader doesn't have the feature to upload files to a path with domain name.
     
    The following path are supported.
     
    c:/images/
     
    /images/
    \\server01\images
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-18-2010, 3:35 PM 61114 in reply to 61108

    Re: PATH not a valid virtual path - trying to upload files to a URL

    Hi Adam,
     
    Thanks for the reply. What solution do you recommend for uploading images to a Cloud hosted site to overcome this?
     
    Regards
     
    Rob
  •  05-18-2010, 8:29 PM 61121 in reply to 61100

    Re: PATH not a valid virtual path - trying to upload files to a URL

    Rob,
     
    When the uploader event handler code be executed, that means the file data is uploaded from client side to server side.
     
    The file is a temp file at the server side.
     
    You can move , copy the file to any disk folder of the current server.
     
    Or copy it to another server via network share \\anotherserver\folder
     
     
    But you can't send the file to another server via http by the args.CopyTo function.
     
    You need use another way for it,
     
    For example , you can use WebService , to send file data from current server to another server.
     
    Regards,
    Terry
     
View as RSS news feed in XML