Changing the upload directory

74 views
Skip to first unread message

Vincent Arsenault

unread,
Jun 3, 2024, 12:20:05 PMJun 3
to AtoM Users
Hi there, 
I'm currently looking on how to change the uploads path. I want to change the default path on where does the pictures and digitals documents are going to.
Any ideas on how that would be done ? I have look for it (the path )in the app.yml file as well as the  propel.ini one.

thanks a lot

Amaya Rodrigo

unread,
Jun 3, 2024, 12:55:06 PMJun 3
to ica-ato...@googlegroups.com
My advice is place your uploads wherever you want, then make a symbolic link so that AtoM "believes" the files are there and finds them where expected.
It should work without issues.

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/ac28e148-b6f8-4a0d-912c-c4465ad92789n%40googlegroups.com.


--
Amaya M Rodrigo Sastre (she/her/bofh) - sysadmin@artefactual 


Alberto Pereira

unread,
Jun 3, 2024, 1:03:26 PMJun 3
to ica-ato...@googlegroups.com
Hi,

I agree. I manage a few instances that have that requirement and the symlink worked without any problems. The uploads folder relative path is hardcoded in several places in atom's codebase.

Vincent Arsenault

unread,
Jun 3, 2024, 1:09:13 PMJun 3
to AtoM Users
Thanks for the reply ! Do any of you where would be the symlink in the codebase ? 

Alberto Pereira

unread,
Jun 3, 2024, 1:29:09 PMJun 3
to ica-ato...@googlegroups.com
A symbolic link is a reference to a file or a folder, and it is part of the operating system, not atom's codebase.
So, if you move the uploads folder, for instance, to /data, you can create in atom's root path an "uploads" reference to that folder.

In this example, it would be something like this (in atom's root folder):

ln -s /data uploads


Vincent Arsenault

unread,
Jun 3, 2024, 1:41:24 PMJun 3
to AtoM Users
gotcha ! thanks for the help ! 

Vincent Arsenault

unread,
Jun 4, 2024, 9:14:15 AMJun 4
to AtoM Users
I been trying for a good moment now, I can't seems to be able to create a symlink to my smb share folder.
I always get the same error ; Failed to create symbolic link ' path' not supported

Alberto Pereira

unread,
Jun 4, 2024, 9:21:48 AMJun 4
to ica-ato...@googlegroups.com
Yeah, that's not going to work. Symbolic links only work on the same filesystem.

You'll need to investigate further and test it, but you can try to mount the samba directory directly in uploads, or mount it somewhere and then mount again to uploads with the --bind option. 

Vincent Arsenault

unread,
Jun 4, 2024, 9:44:20 AMJun 4
to AtoM Users
Thanks ! I'll take a look into that. 
Does --bind option is copying the file ? Would the files still be in the original uploads folder ?
I'm asking because the whole purpose of that symlink on smb would be to make sure I'm not runing out a space on my 1tb HD on witch atom is install

Alberto Pereira

unread,
Jun 4, 2024, 9:49:43 AMJun 4
to ica-ato...@googlegroups.com
It's only one location, which is the original. It will not duplicate disk space. Any change in either folder will be reflected in the other.

Message has been deleted

Vincent Arsenault

unread,
Jun 4, 2024, 11:54:18 AMJun 4
to AtoM Users
Ok, I'm afraid I'll run out of space on that 1TB HD pretty fast if the file still 'stored' in the original locaiton
I'm surprised there's not a more intuitive way to do so.
Thanks for your help ! 
Message has been deleted

Alberto Pereira

unread,
Jun 4, 2024, 12:38:55 PMJun 4
to ica-ato...@googlegroups.com
I'm sorry if I wasn't clear in my reply.
If you do:

mount --bind [mounted smb path] [uploads path]

this will not create a duplicate of the folder, but a mirror, in [uploads path] of the original location [mounted smb path]. 
It will do what you want. In thesis anyway; I haven't tested it.

I hope this helps

On Tue, Jun 4, 2024 at 4:54 PM Vincent Arsenault <vin...@museeambulant.com> wrote:
Ok, I'm afraid I'll run out of space on that 1TB HD pretty fast. 
I'm surprised there's not a more intuitive way to do so.
Thanks for your help ! 

Vincent Arsenault

unread,
Jun 4, 2024, 12:46:10 PMJun 4
to AtoM Users
I see !
 I was going the opposite route then. 
The things I see with that, is that I couldn't find in the atom config, a place where I can specify the 'new' uploads path (that would be the mounted SMB path). 
Because by default they will still go in [uploads path], I would need a way to tell atom that I want the digital file to go elsewhere

Alberto Pereira

unread,
Jun 4, 2024, 12:52:33 PMJun 4
to ica-ato...@googlegroups.com
No need to tell atom. It will continue to work in the usual uploads folder. But, because it is a mount point, any read or write in that folder will automatically be using the samba folder.


Vincent Arsenault

unread,
Jun 4, 2024, 12:59:39 PMJun 4
to AtoM Users
Ok, I understand how that works(well I think.... ). But am I not still running in the same issue that my files will still take up space on my drive ? As the will be put in the [uploads] and then mirror in the [mounted uploads].
Sorry pretty neophyte with the SMB share stuff.
I really appreciate your help thank a lot. 

Alberto Pereira

unread,
Jun 4, 2024, 1:07:37 PMJun 4
to ica-ato...@googlegroups.com
Ah, maybe mirror wasn't the most appropriate verb in the context. When writing to the uploads folder, because it is a mount point, it will be writing directly in the samba share, not the disk where atom is.

Note: backup the data before testing any of this.

Vincent Arsenault

unread,
Jun 4, 2024, 1:13:17 PMJun 4
to AtoM Users
Thanks again, I'm currently working a test platform so no worry for the data. Thanks for the reminder tho.
I'm also not a english speaker so that made it a bit harder to understand.
I going to test all that, and let you know how that goes.
Once again really appreciate all the help you've been providing today ! 

Reply all
Reply to author
Forward
0 new messages