Upload image to different directory

Last post 04-02-2009, 2:52 PM by kitsolutions-dev. 3 replies.
Sort Posts: Previous Next
  •  11-10-2005, 3:19 PM 12492

    Upload image to different directory

    Hello
     
    I have two websites
    D:/IIS Projects/publicWebsite/
    D:/IIS Projects/adminWebsite/
     
    The editor is situated in the adminWebsite directory which is the admin section for the publicWebsite.
     
    I would like to upload my images or change the upload direcory path to
    D:/IIS Projects/publicWebsite/Uploads
    instead of
    D:/IIS Projects/adminWebsite/Uploads

    is this possible?
     
    I tried using the code
    Editor1.Setting["security:ImageGalleryPath"]= "D:/IIS Projects/publicWebsite/Uploads";
    but i get an error
  •  11-10-2005, 5:16 PM 12494 in reply to 12492

    Re: Upload image to different directory

    Ciaran,

    When use the physical path to specify the Image gallery path, the physical path must be part of the current web site.

    Use physical path:
    <security name="ImageGalleryPath">c:\inetpub\wwwroot\uploads</security>

    For your situation, I suggest you create a virtual path ("/uploads") and points it to D:/IIS Projects/publicWebsite/Uploads.

    And use the following methods:

    //use the app-based path 

    Editor1.Setting["security:ImageGalleryPath"]= "~/uploads";
    //use the absolute path 
    Editor1.Setting["security:ImageGalleryPath"]= "/uploads";
    That will resolve your problem.

    Hope it helps.

    Let me know if you have any further questions.





    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

  •  11-10-2005, 5:43 PM 12495 in reply to 12494

    Re: Upload image to different directory

    Thanks Adam
     
    That worked
  •  04-02-2009, 2:52 PM 50720 in reply to 12495

    Re: Upload image to different directory

    Can you pls tell me, what you did exactly to solve it? i mean with code, if possible!!!
View as RSS news feed in XML