Skip to main content

Questions tagged [volumes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
300 views

How query all folders of a volume?

I want to query a list of all folders in a specific volume in my front-end template (loggedin users only). I'll need the folderId to display all files of the selected folder. The idea is to show a ...
Maarten Heideman's user avatar
1 vote
1 answer
112 views

Set asset volume dynamically via module depending on uploaded file kind

I'm trying to set the asset volume dynamically for new assets, using a module. I would like the volume to be based on the asset's file kind – in my case, automatically putting MP4s into a 'Videos' ...
Josh Harrison's user avatar
0 votes
1 answer
51 views

How to enforce subfolder names for uploaded assets in hierarchical related sections

My goal is to ensure uploaded videos are organized into folders like: /Show/Season/Episode/videofile.mp4 Or stated another way... /{{ Show ID of grandparent }}/{{ Season ID of parent }}/{{ Episode ...
Jim's user avatar
  • 139
1 vote
1 answer
207 views

How to rename an asset on file upload Craft 4

I am looking to update some custom module code which updates the file name on upload. In Craft 3 I had this working by listening to the EVENT_AFTER_SAVE on an Asset. It would detect the ID of the ...
zizther's user avatar
  • 449
1 vote
1 answer
2k views

Unable to use credentials.json from .env file for Google Cloud Storage

Setup Craft CMS: 3.5.19.1 PHP: 7.2.24 This setup is in process of being updated to the latest version. I'm thinking the issue reported here may already be solved but I can't find any information on it....
cballenar's user avatar
  • 1,409
1 vote
2 answers
323 views

How to upload animated webp files?

I've created an asset volume to which I can successfully upload jpgs, pngs, static webps etc. But when I try to upload an animated webp I get the alert: Upload failed. The error message was: “The file ...
patrick.altair's user avatar
3 votes
2 answers
103 views

Enironment Variable being rendered literal

OK, So created 2 variables in my local .env file ASSET_BASE_URL="https://mysite.local/resources" ASSET_BASE_PATH="/Volumes/yada/yada/yada/resources" Then in the CP, created a new ...
stuartmcd69's user avatar
1 vote
1 answer
63 views

Asset file permissions issue hyperlane

I am having trouble setting up image volumes correctly in Hyperlane. My best guess is that is has something to do with permissions but I have not been able to find a solution. This is how I have set ...
Stig Melón-Bratvold's user avatar
1 vote
1 answer
247 views

Asset volumes with dynamic subfolder

I have an asset volume which uses dynamic subfolders on the field level. I have an assets volume called 'members'. In a matrix field on the user profile tab there is an image field that sets its ...
Adam Menczykowski's user avatar
3 votes
2 answers
3k views

Error on upload: "Impossible to create the root directory..."

In Craft 3.2.10, I'm getting this error message when I try to upload an image asset: Upload failed. The error message was: “Impossible to create the root directory "/Users/me/Work/Client/repo/web/...
BBaysinger's user avatar
4 votes
1 answer
544 views

What is "Temp Uploads Location" in Craft 3.2.10

In Craft (Solo) 3.2.10, In Settings > Assets > Asset Settings, there's a field called "Temp Uploads Location". I do see images in mine that I intended to go into the system, but not into there. What ...
BBaysinger's user avatar
1 vote
1 answer
257 views

When to create a new asset volume?

I'm not sure if I've been using asset volumes correctly. For each folder inside my /uploads directory, I've been creating a new volume. So they're all relative to /uploads I have volumes for things ...
good_afternoon's user avatar
4 votes
1 answer
861 views

Asset Volume using Environment Variable on File System Path as literal string on upload

I have a volume called "Website" with a File System Path that uses an environment variable, $ASSET_ADHOC_PATH. The variable has been setup in my .env file as follows: ASSET_ADHOC_PATH="/home/theadhoc/...
theAdhocracy's user avatar
1 vote
1 answer
482 views

Best practice for volume aliases in config files

I'm wondering about using a config/volumes.php file to specify volume aliases (instead of putting them in config/general.php). There's a comment in a previous codebase mentioning https://docs.craftcms....
plaintxt's user avatar
  • 488