Questions tagged [filesystem]
The filesystem tag has no usage guidance.
20
questions
1
vote
1
answer
41
views
Image path is broken after updating site from Craft version 3 to 4
I am currently in the process of upgrading my site from 3 to 4. My craft CMS version is 4.4.16.1
None of my images are loading in the site after performing update. Our images are stored in AWS.
Upon ...
0
votes
0
answers
45
views
Is it possible to restrict a File System’s or Assets Volume’s file type?
I think I know the answer to this is “No” but I’m interested to know if I’ve missed something or whether I should turn this into a feature request.
I know I can restrict file type for an Assets field
...
0
votes
1
answer
46
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 ...
1
vote
1
answer
140
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 ...
1
vote
1
answer
121
views
File Issue "A server Error Occurr" when try to upload the file
When I try to upload the file OR go to the Asset section - I have Server Error Occurr error. In console I see the error that is somehow related with ?p=admin-lime/actions/element-indexes/get-elements ...
1
vote
0
answers
78
views
Craft4 Upgrade did not create filesystem entries
I'm making a post about this as a form of documentation of an issue I ran into while upgrading one of my sites to Craft4.
I followed the upgrade instructions and got the site upgraded to the latest ...
2
votes
1
answer
871
views
PHP Fatal error during installation
I am trying to run craft inside a homestead box. The box boots and installs everything correctly, and when I navigate to http://localhost:8000/admin I see the install screen and can click through the ...
1
vote
1
answer
313
views
Error: File to import not found or unreadable: ../../../../../lib/craftcms-sass/mixins
I have two Craft websites running locally and they both have broken css on the backend due to the error below. Every time I update it is temporarily fixed but after a few clicks or refreshes it's back ...
4
votes
2
answers
663
views
"An unknown error occurred" in assets screen
I have a number of assets resources all set to upload to the same amazon s3 bucket. Two of my four assets resources show "An unknown error occurred" twice when I view them in /admin/assets.
The ...
1
vote
1
answer
249
views
Cloudinary thumbnail creation for assets
I realized Craft 3 generates its own thumbnails and does not use Cloudinary to do this on the CP. My question is, how and where should I modify the JavaScript code, or what is the best practice to use ...
1
vote
0
answers
356
views
For asset uploads, where should the 'temporary path" be created?
I just moved my Craft CMS site to production (MediaTemple DV) and I can't upload images to my asset sources. I get this error:
Error uploading the file: there was a problem creating the temporary ...
2
votes
1
answer
194
views
Lowercase filenames
I've been unable to find a config option for giving all uploaded files and their transforms lowercase filenames.
Is this possible?
4
votes
2
answers
2k
views
Serve PDF file at url with variable
Is it possible to serve a file in a Twig template? I need to get a file (asset) from a global setting, and serve it at a particular URL.
This code is close, but it seems that source() is the wrong ...
3
votes
1
answer
471
views
Do assets have to be below public_html to access them in redactor?
I love that Redactor lets you choose existing entries, categories, and assets!
I am trying to set up a 'Files' source whose File System Path would be something like
/home/hostingaccount/craft/files
...
3
votes
2
answers
931
views
Asset filename unicode normalisation?
We have a site deployed in Norway, and people have uploaded PDF-assets with Norwegian non-ascii characters in the filenames.
Normally this works fine, the URLs are encoded like this and it works:
...
3
votes
1
answer
2k
views
Do I use Twig filters 'include' and 'extends' for localized site correctly?
I use regular file names for template structure from documentation for clearer understanding.
I have the template structure:
_layouts
base.twig
_includes
header.twig
body.twig
foot.twig
index....
3
votes
1
answer
3k
views
Force download of asset file from template
I have a template called download that receives an asset ID, looks it up and should force the browser to download the file. I've gotten this far with the {% headers %} tag, but I can't figure out how ...
3
votes
1
answer
841
views
getResourcePath() for folders in a plugin
I have a plugin that has an folder inside of it's resources. I need to iterate through those files.
To get the path, I tried craft()->resources->getResourcePath('folder-name'), but it seems to ...
0
votes
1
answer
2k
views
File upload fails without error
I try to upload a file larger than the 16 MB Craft limit. The file I try to upload is 61 MB.
I have set the maxUploadFileSize to 256000000.
My hosting company changes the server PhP settings to this:
...
2
votes
1
answer
891
views
What is the best way to test if a file exists without knowing which file extension a Craft install is using for templates?
Craft allows users to use whatever template extension they prefer: .html or .twig or something custom.
We can check if a file exists like so:
IOHelper::fileExists($filePath)
Is there any way to ...