Results 1 to 4 of 4

Thread: Uploading to a diffrent site on the same server

  1. #1
    Join Date
    Jun 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Uploading to a diffrent site on the same server

    Hi,

    I am familiar with uploading files but am wondering whether it is possible to upload a file via a script, to a different site on the same server?

    For example:

    I am on site1.com and I choose to upload an image, once I have selected the image that I want to upload, this then gets uploaded to the images folder on site2.com

    Is there some form of base directory restriction that I can set up between the two sites?

    I intend to use vb.net if anyone has any links to examples


    Thanks in advance

  2. #2
    Join Date
    Mar 2006
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    I have tried it and it did not work, altho I am not a hundred percent sure my script was okay,
    I don't think the the way the sever security is set up will allow it.

  3. #3
    Join Date
    Mar 2005
    Location
    Hampshire
    Posts
    432
    Thanks
    4
    Thanked 3 Times in 3 Posts

    Default

    It is not possible due to the user restrictions that the site runs under. One method is to write a webservice on the second site to accept uploads. Then you can upload to Site1 into a temp folder, once the upload is complete you can have your script load the image onto Site2 via the webservice.

    Just chill

  4. #4
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    If you are using VB.Net and doing the upload via a web form then the best way would be to store the image filename in a database and have both sites link to the same path to look for the images.

    ie. You upload to media.domain.com/images/ and store the filename in the DB. then both site1.com and site2.com can reference the image using:

    Code:
    <img src="http://media.domain.com/images/filename" alt="image file" />
    Of course this won't work with HTTPS due to loading across domains, however in that case you could just store the Image in the DB.

    Sol.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Site up time
    By Spire in forum Technical Support
    Replies: 4
    Last Post: 1st June 2006, 10:30 AM
  2. Blocking IP addresses from using the site
    By Space Cowboy in forum Development Support
    Replies: 3
    Last Post: 26th May 2006, 06:11 PM
  3. Replies: 13
    Last Post: 16th February 2006, 02:40 PM
  4. Uploading images using Cute Editor
    By captain in forum ASP.NET
    Replies: 5
    Last Post: 14th January 2006, 04:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •