I have the pics up in the gallery, and just upgraded to G2. The transition is working fine, things are good, however, I have a new folder structure on my site etc and I'd like to imitate (eventually synchronize that) with the structure I want to use for Gallery.
Basically I have a /home/siteroot/gallery/userUpload directory where all my pictures are, and I'd like to instead have the pictures stored at /home/sitestorage/pictures/andy, and then make that my user upload directory
Anybody know how to do this? I'm fully stumped.
Thank you in advance!
Posts: 16503
FAQ: How can I move my storage folder to another path?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 35
no i don't think this is going to work... The pictures aren't in the gallery data folder.
I have
/home/site/gallery/
/home/g2data/
/home/site/gallery/userUpload
userUpload is where all the pics are now. I want it to be like this:
/home/site/gallery/
/home/g2data/
/home/newSite/Pictures/
So userUpload is now Pictures etc. Everything inside it is the same. just rename the folder, and move the source images. Not move the g2data folder, it's fine where it is. This is eventually going to synch to my laptop Pictures directory.
Posts: 16503
Are your pictures symlinked from /home/site/gallery/userUpload?
If not, or if you don't know what I'm talking about, then they are actually stored in /g2data/albums/
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 35
No I don't think they are symlinked. When I rsync / scp I store them /home/site/gallery/userUplaod/.
I want to try to stay away from symlinking things, because I have my site back up to another linux box, where yet another backup is made to a windows machine (which doesn't support symlinks)
Posts: 16503
Then I don't understand your question. Your upload directory is completely independent from Gallery and not tied to making any changes in Gallery. Unless you are using the Add Items plugin. Then all you need to do is go to Site Admin > Web / Server and specify a new path to allow uploads from the local server.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 35
Right, it's not directly tied to gallery, except that it is the source of the files. So if I move those, then supposedly the thumbnails would remain, however the original res picture would not load. And if the thumbnails were refreshed, their source would be gone and all the pics would be broken.
For exampl: I had gallery 2 or something, and recently applied an upgrade. In order to do the update, I ran 'mv userUpload ../../../' so that it was out of the way, 'rm -rf /home/site/gallery', 'unzip newGallerySource.zip ./gallery/', 'cp oldConfig ./gallery/config.php' mv userUpload ./gallery/
Similar to that. The upgrade was fine, but I actually didn't do the mv userUpload directory until after I went through the update process. Then I browsed my gallery and the folder structure was all in tact with all the other stuff, but all thumbnails were broken and the original picture did not pull up. Once I moved it back, I clicked rebuild thumbnails, and eventually everything was just fine.
Posts: 16503
If they are not symlinked then they have absolutely no tie with Gallery at all. When you import images they, the full size image, goes to /g2data/albums/AlbumName/ImageName.jpg
You can delete, rename, move those files from your upload directory all you want. If they are not symlinked to Gallery, then Gallery does not know about them.
If you're still not understanding me or think I'm not understanding you, please either post or PM me a URL to your site. If it would require a login for me to really see stuff, then please PM me a login.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 35
well, I can't shell from work so I can't determine if they actually are symlinked or not... It may be symlinked, I just thought gallery knew where they were and used them there. I use the "add items from local server directory" option and have set that folder as the directory users can upload too. However, if I move the pics or delete them from this folder, I'm 99% sure they will disappear from gallery. I just want to make gallery use a different folder instead of that one.
site is "home.djandyj.com/gallery"
Posts: 16503
If and only if they are symlinked. If they are not, then Gallery doesn't even know they exist until you go to add them from local server. After that it copies/imports them into g2data/albums/AlbumName/ImageName. Yes, using up twice the amount of space because the image is in 2 locations now.
If you are not using the symlink option, then you can delete that entire directory and nothing will happen. Of course, don't just go deleting it because I said so, if you do so without backing up then shame on you ;) Looking at the numbers of views, on your albums and photos it doesn't appear to be super high traffic, so you could just try renaming that directory and try it ;) If it breaks, rename it back.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 35
Ya def not super high traffic, just my personal stuff. I'll rename it and see if it still works, maybe it just broke because I was coming at it for the first time after the upgrade.
If it still works then I guess I'll just move it and make the new directory the user Upload one for add local items feature.
Now, if I shell into the server and make new directories and put pics in the g2data/albums/ folder, it wouldn't automatically add / create albums and such would it? Cause that would be perfect....
Posts: 16503
DO NOT DO THAT, EVER
There is little (no) need to ever go into g2data unless something is broken. Gallery handles everything under g2data
No, that wouldn't work. You may want to look at this:
http://gallery.menalto.com/node/81010#comment-284733
http://codex.gallery2.org/Gallery2:User_Contributions
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 35
Yea, if I did do it i am 99% sure that it would not work simply because the database wouldn't reflect those changes.
I haven't had a chance to check out those links that you also put on my other post yet, but I do appreciate them! I will check them out as soon as I get the folder moved.
Posts: 16503
There's nothing about 99% here. It wouldn't work, period. Now with that said, if you have an existing image in Gallery, but replace it from the back end, then rebuild the thumbnail and resized images you can replace an image that way, it's a lot of work, but you can do it. But you cannot import images that way, no how, no way.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 35
Well I had to say 99% cause I can always, ALWAYS be wrong. lol ;)