Skip to main content
7 votes

Upload file size limits to 256MB

When determining the maximum upload file size, Craft first takes the php.ini file upload_max_filesize, post_max_size and memory_limit into account by getting the minimum value and only then applying ...
Brad Bell's user avatar
  • 67.5k
6 votes

How to rename filename of asset before (or after) upload in Craft 3

Well, after searching for this for more than 2 hours, I bumped into a working solution; Event::on( Elements::class, Elements::EVENT_AFTER_SAVE_ELEMENT, function(ElementEvent $event) { ...
Arjan's user avatar
  • 151
5 votes
Accepted

Error uploading .bmp file format - gets rejected

You're probably using GD, which doesn't support BMP files. If you install Imagick on your server, Craft will use it automatically and it supports a much wider range of file types, including BMP ...
Brad Bell's user avatar
  • 67.5k
5 votes
Accepted

Images containing EXIF orientation tag are not rotated on upload

After some mail exchanges with Brad and Andris from Craft CMS, it turned out that there is an edge case where the image rotation on upload will not work if the EXIF extension is not installed (which ...
kant312's user avatar
  • 496
4 votes

Adding images directly to public folder

You need to use the Update Asset Indexes tool in Settings in the control panel: Whenever there are files within your asset source that were not added directly by Craft (e.g. via FTP), you will need ...
Marion Newlevant's user avatar
4 votes
Accepted

How to control the format of an asset's Title

For Craft 2, You can write a plugin that listens to the onBeforeSaveAsset event, and changes the title from the asset parameter to whatever you want. Something like: if ($event->params['isNewAsset]...
Brad Bell's user avatar
  • 67.5k
4 votes
Accepted

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

I understand now within the context of you are using docker. Since docker creates a new file system separate from your computer's file system, you will want to run these commands on the docker ...
Clark Nelson's user avatar
3 votes
Accepted

Front end assets uploading, does not appear to be a an image error

The issue lies if you have a Preparse field in that field layout, see details here: https://github.com/aelvan/Preparse-Field-Craft/issues/23
Tim Kelty's user avatar
  • 3,081
3 votes
Accepted

How does Craft handle uploading assets to AWS?

They are uploaded to Craft first to a temporary file, then Assets uses the Asset Source to work out where to send them next - either the local file system or a remote one. For handling large uploads ...
Josh Angell's user avatar
  • 2,311
3 votes

Upload Image Custom Field

I believe you are looking for the Assets Field
Ben Parizek's user avatar
  • 13.5k
3 votes
Accepted

Dynamic Subfolders leaving empty folders behind

When Assets moves files around because of dynamic Assets folder changes, it does not remove empty folders. On the surface it seems like a no-brainer - just check if the folder is empty and if so, ...
Andris Sevcenko's user avatar
3 votes

Upload and crop profile photo in frontend

This is a very old question, but thanks to this example I was able to build quickly a profile picture form using Craft 3 and jQuery File Upload plugin (thank you!). The action value and file input ...
Romain P.'s user avatar
  • 1,852
3 votes

Upload file size limits to 256MB

Apparently, Craft requires memory_limit to also be set to max value, so setting memory_limit in php.ini did solve my problem.
Lukigi's user avatar
  • 565
3 votes
Accepted

How can I insert images into a Redactor rich text field in a front-end form?

It doesn't seems possible natively, you should write a custom upload script. → Example #1 → Example #2 If it doesn't matter to add the images inside your rich text field, one more simple workaround ...
Romain P.'s user avatar
  • 1,852
3 votes
Accepted

Default Upload Location needs matrix field and entry info... How?

If your desired URL is: http://sitename.com/uploads/towns/town-slug/album-name/filename.jpg The the "Upload Location" for the setup you described would be something like: towns/{owner.slug}/{...
Brad Bell's user avatar
  • 67.5k
3 votes

Uploaded images are saving to the server's temp folder and throwing 500 errors

Crappy shared web hosting? That would be my guess. It seems imprudent to be developing a site on the same host as a live site, it has to share the (probably already stretched) resources available on ...
Seth Warburton's user avatar
3 votes
Accepted

Uploaded Assets always get 600 File Permission and are therefore not displayed (403 Error)

I just missed the "Assets in this volume have public URLs" lightswitch while setting up the volume :)
Rattikarl's user avatar
  • 393
3 votes

Laravel Forge not honoring Craft 3 maxUploadFileSize config setting

After doing some digging, this article helped solve my issue: https://stackoverflow.com/questions/36582004/increase-upload-max-filesize-via-forge. By increasing the post_max_size in the PHP FPM ...
Jonathan Simcoe's user avatar
3 votes

Laravel Forge not honoring Craft 3 maxUploadFileSize config setting

Check out nginx-craft specifically: https://github.com/nystudio107/nginx-craft/blob/master/forge-example/NginxConfiguration.conf#L25 # Disable limits on the maximum allowed size of the client ...
andrew.welch's user avatar
  • 11.6k
2 votes

File upload - maximum upload size of 0 B

I had the same problem, changing post_max_size in php.ini to something other than 0 (I used 8M) did it for me. I'm not sure why this works: php.ini says a value of 0 should disable the limit ...
Paul's user avatar
  • 339
2 votes

Uploaded images stripped of EXIF data

For Craft 3 the setting 'preserveExifData' in config/general.php should be set to true
Niek's user avatar
  • 49
2 votes
Accepted

Craft Commerce: Upload File Field in Order?

This is definitely possible. First create a file field to attach to your order in the control panel. Then create a file input type with a name attribute that uses the field you created name="fields[...
Luke Pearce's user avatar
  • 3,863
2 votes

Upload failed for filename. The path doesn't exist

I suspect your public root is something else/more than just /public_html. Try adding the following to your index.php file, and refresh your site: die($_SERVER['DOCUMENT_ROOT']); Your real public ...
Mats Mikkel Rummelhoff's user avatar
2 votes
Accepted

JPG upload not completing in Craft 2.6.2789

My guess is you had an auto-update or a git deployment go bad and some files didn't get updated properly. To be safe, I'd download a fresh copy of Craft from https://craftcms.com and replace your ...
Brad Bell's user avatar
  • 67.5k
2 votes

Uploaded image not appearing

My first step to troubleshooting this is to confirm that the Asset Source URL is correct in the source settings.
CraftQuest's user avatar
  • 1,122
2 votes
Accepted

Upload images bigger than 1MB not working

Nginx's setting client_max_body_size was set to its default value of 1M because it was not specified after provisioning the DO server with Laravel Forge. Weird thing is just that the user doesn't get ...
Johannes's user avatar
  • 740
2 votes

Asset Uploading via Assets Field Broken, please help

This is normally caused due to a 500 error and monitoring the AJAX request using your browser's dev toolbar or using the log file craft/storage/runtime/logs should give you a clearer picture. It's ...
Regan Lawton's user avatar
2 votes

Asset Uploading via Assets Field Broken, please help

Checking the logs is of course recommended: craft/storage/runtime/logs However, I have personally found that failed uploads are related to "write" issues where either the directory permissions are ...
Jarrett Barnett's user avatar
2 votes
Accepted

Uploading local asset hangs and produces jQuery console error

You can use this support article to help debug failed uploads: https://craftcms.com/support/upload-troubleshooting
Brad Bell's user avatar
  • 67.5k
2 votes

Issue with uploading files from frontend

Have you tried enabling devMode in the craft/config/general.php file? You can do this by adding 'devMode' => true to the array. You should then be able to see an error on submission. If this fails ...
Matt Shearing's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible