Piwigo.org

You are not logged in. (Register / Login)

Announcement

#1 2010-10-07 15:56:26

rock
Guest

Change image upload path

is there any to change the upload images path to diffrent folder or diffrent server ??

#2 2010-10-07 23:27:44

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11717
Website

Re: Change image upload path

Hi rock and welcome to Piwigo forums :-)

1) install/activate [extension by Piwigo Team] LocalFiles Editor from screen [Administration > Plugins > Manage]

2) open [Administration > Plugins > LocalFiles Editor > Local config] and paste the following code:

Code:

$conf['upload_dir'] = './another_upload_directory';

This is where pLoader/UploadForm adds photos. This path must be relative to  the Piwigo installation directory (but can be outside, as long as it's reachable from your webserver).


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#3 2012-02-18 10:31:54

delakut
Member
Location: Munich, Germany
Registered: 2012-02-14
Posts: 7

Re: Change image upload path

I changed my $conf['upload_dir'] to '../../files/piwigo'. I'm able to upload pictures with the flash uploader to this directory. That works fine. My problem is now that piwigo is not displaying the pictures in my album. I get the error message the file does not exist. It would like to safe my pictures in the files directory outside the html directory to backup them seperately.

Error Log:
[Sat Feb 18 09:33:37 2012] [error] [client 87.174.99.117] File does not exist: /var/www/html/web123/html/files, referer: http://www.das-zweite-konglomerat.de/gallery/

My directory structure:
/files/piwigo_pictures
/html/gallery_installation

Offline

#4 2012-02-18 11:02:01

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11717
Website

Re: Change image upload path

Hi delakut,

Indeed, $conf['upload_dir'] must be a direct or indirect sub-directory of your Piwigo installation, to make it visible through HTTP.

In your case, here is what I would do :

1) in your "gallery" directory, remove "upload"
2) in your "gallery" directory, create a symbolic link "upload" to "../../files/piwigo"


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#5 2012-02-18 14:56:47

delakut
Member
Location: Munich, Germany
Registered: 2012-02-14
Posts: 7

Re: Change image upload path

It works, thanks a lot.

A quick guide:
I created the symbolic link with php. You only need to copy a php file to your root directory and start it in your browser. The code is:

<?php
if (symlink('/var/www/html/web123/files/piwigo', '/var/www/html/web123/html/gallery/upload'))
{
  echo "Symbolic link was created";
}
else
{
  echo "Symbolic link was not created";
}
?>

It is possible that you need to change the chmod to 755.

The upload_dir stays like it is. You don't need to change it anymore.
$conf['upload_dir'] = './upload';

Offline

#6 2012-02-18 17:52:53

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11717
Website

Re: Change image upload path

delakut wrote:

A quick guide:
I created the symbolic link with php

Very smart. As a Linux user I would have said "if you don't have SSH access, you can't create a symbolic link".


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

Board footer

Powered by FluxBB

About this website · Donate · Contact Piwigo project © 2002-2013