Default assets path for media (images, video, PDF)
Sean Freeman
Default assets path for media (images, video, PDF)
## Use Case
End Users are prompted to use a default assets path in the root directory /assets which would store images /assets/images etc.
This prevents poor documentation management if users have read/write access to folders where they upload asset files created a messy documentation folder.
This also prevents poor user experience in restricting users to one read/write folder for assets without proper indication in the Upload File prompt box.
## Proposed solution:
Option to have default assets directory, where the Upload File prompt box removes directory structure selection and just requests the file/folder which are the assets to be uploaded to what ever the administrator has defined as default
Joel DeTeves
We would really like to have the assets uploaded while working on a page default to the same location as the page if that makes sense. Aside from helping keep assets organized, this also helps keep permissions consistent so we don't accidentally end up creating assets in the root directory where users who have access to that page can't see them. Thank you,
Tak-MK
A simple idea that came to mind for this to be done:
Checkbox on Settings like "Restrict asset folders per page".
Then, each time you edit a page, it only has access to a folder which is the ID of the page (176, for example), so no matter how you reorganize and move everything here and there, assets will be inside that "176" folder.
I think I'll do that manually for now (I would try to do a PR but I have not much idea and v3 with new asset manager is around the corner...).
Thanks!
Edit: I just realized that I wrote the same idea months ago in a comment...
Deni Begaj
I find this very useful too. If I have a page with link
general/customer/profiles/customer-1
, I would love that when I open the asset manager modal, wiki has already created the folder structure inside the assets which corresponds to the link of the page where assets will be put. For sure, having this folder be updated dynamically upon page link update (like fellow commenters suggested) would be a cool follow-up feature.I find this very helpful because Wiki.JS authorization flow (for assets) takes into account the asset path. But if by default, all assets go to root path, then authorization flow is already faulty :/
Tak-MK
Something "automatic" for that, instead of having a folder set up by the administration, could be an option that makes every page to have an asset folder called like its page id, for example, and if you delete that page, it deletes that asset folder too.
That way if I move the page to another hierarchy place, I don't have to fix that asset folder hierarchy too (as I'm doing now manually on the database).
Nicolas Giard
Merged in a post:
Store assets on a "linked" folder to the page
Tak-MK
Hi there!
I didn't know how to explain that on the title, but the thing it's that I'd like an option to store all assets on a "automatic folder" that moves along with the page, so if I reorganize pages along the wiki, assets "move" with them and I don't have to reorganize also the hierarchy on the assets manager.
Thanks a lot!
Fabian
This would be great for me!
S
Sebastien
Maybe the media default path should be the same a the page path. eg for the page /wiki/foo/bar, when the user click the upload button, The interface is already in /wiki/foo/bar
Fabian
Sebastien: +1