Unique users folder #2912
Unanswered
volkankaban
asked this question in
General
Replies: 1 comment 2 replies
-
You have also mailed support, and I've replied there. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to be sure, before purchasing Media Library, can I use with unique users folders like .uploads/{model_id}/ for each user? I want to give them only so they can keep all photos in one place. It's a quick solution for me because I can share a folder with them, and they can access it anytime?
unique users folder;
uploads/11/ .
uploads/12/ .
uploads/13/ .
uploads/14/ .
uploads/15/ .
users in DB;
users.id = media.model_id
11 = 11
12 = 12
13 = 13
14 = 14
15 = 15
CustomPathGenerator.php
model_id.'/'; switch ($media->collection_name) { case User::PROFILE; return str_replace('{PARENT_DIR}', User::PROFILE, $path); case Product::Image; return str_replace('{PARENT_DIR}', Product::Image, $path); case Setting::PATH; return str_replace('{PARENT_DIR}', Setting::PATH, $path); case 'default'; return ''; } } /** * @param Media $media * @return string */ public function getPathForConversions(Media $media): string { return $this->getPath($media).'thumbnails/'; } public function getPathForResponsiveImages(Media $media): string { return $this->getPath($media).'rs-images/'; } }Beta Was this translation helpful? Give feedback.
All reactions