Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Change the upload destination?

Hi,

I have 2 forums with the same Mysql database (english & german).
Now, when I upload a new profile picture, users in the other forum can't see it because it's only in the english forum. Now is there a way to share the content of upload folder?

Comments

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @DogHam

    I'm not sure there is a simple way around this.

    I have tended to simply copy the image over to the Uploads folder in the other forum install.

    I suppose you could look into editing the Upload submit form for one of the installs to point to the other Upload folder, but that might be a bit 'hacky'.

  • businessdadbusinessdad Stealth contributor MVP

    You could use a symbolic link. Create a single Uploads folder, and point two symlinks to it (one in each forum). I haven't tried, but it should work.

  • simlinks works but not like you said.

    simlink from german upload to english upload folder Yes to overwrite files.

  • businessdadbusinessdad Stealth contributor MVP

    @DogHam said:
    simlinks works but not like you said.

    simlink from german upload to english upload folder Yes to overwrite files.

    That also works, but I normally prefer to keep common repositories in their own place. For example:

    • Uploads
    • Vanilla_1

      • [Symlink to Uploads]
    • Vanilla_2

      • [Symlink to Uploads]

    This way, all websites would be cosnsistent, all of them would point symlinks to a physical folder.

  • but if I make a simlink from uploads to a custom folder, it will send all content to this custom folder. But the forum is searching in uploads. Using godaddy hosting.. Maybe is your hosting different. But thank you very much you helped me :) You have awesome from me :)

  • that is the point of symlink it is like a pointer to the file or folder, but posing as the real deal.

    if you indeed can create symbolic link, you may need to setup .htaccess to follow them.

    grep is your friend.

  • businessdadbusinessdad Stealth contributor MVP

    @DogHam said:
    but if I make a simlink from uploads to a custom folder, it will send all content to this custom folder. But the forum is searching in uploads.

    The forum is indeed looking into vanilla/uploads, but, since such folder is not a real folder, but a link, it will automatically and transparently be brought to the custom folder and see its content. Below is and example of what you would see if you would navigate through the folders.

    • Custom folder (physical one)
      • File01.jpg
      • File02.jpg
      • File03.jpg
    • Vanilla_1
      • [Custom folder] (link)
        • File01.jpg
        • File02.jpg
        • File03.jpg
    • Vanilla_2
      • [Custom folder] (link)
        • File01.jpg
        • File02.jpg
        • File03.jpg

    As @x00 pointed out, if you use symbolic links make sure that you enable the FollowSymLinks option in Apache (or the equivalent for your web server).

Sign In or Register to comment.