Skip to content

Conversation

@i-just
Copy link
Contributor

@i-just i-just commented Nov 22, 2023

Description

  • removes Control Panel > Settings > Assets > Settings page along with the AssetSettingsController
  • adds tempAssetUploadFs general config property and method
  • temporary uploads can now be stored either in the local storage folder (like before) or in a designated filesystem;
  • if the filesystem is used to store temp uploads, it cannot be reused to create a volume or to hold transforms

For documentation

for the load-balanced environments in particular:

  • It would be good to add some sort of explanation on what the Temp Uploads Location is used for. I couldn’t find any info in the docs on what this setting does - did I miss it? Most people just leave that as is (local storage folder) or set that to a dedicated volume, but there’s nothing in v3 and v4 stopping you from re-using the volume you selected for Temp Uploads Location in your Assets fields, and that can lead to issues like this: #11405. It’s a lesser-known setting, and I’m not sure it’s explained anywhere in the docs.
  • Long story short, it was introduced for load-balanced environments, and that’s what it should really be used for. In other cases, it should be set to the default, which is the local storage folder (for v3 and v4).
  • Because of the issue #11405 and because it’s beneficial for the Cloud, in v5, we’re removing that setting from UI completely, putting it into General Config and moving it from Volume to Fs.

for the upgrade guide:
Before the upgrade, you need to check your setting in v4 in Control Panel > Settings > Assets > Settings. If Temp Uploads Location was set to an actual volume, you need to create a Filesystem that will be used to store the temporary uploads and then add the handle of that filesystem to the config/general.php, to -> tempAssetUploadFs(). please note that this filesystem won’t be available for volume creation.

Related issues

CMS-989

@linear
Copy link

linear bot commented Nov 22, 2023

CMS-989 Temp upload location should be a filesystem, not a volume

Having temp assets stored in a volume adds unnecessary complexity, and leads to some unexpected behavior if the volume ends up getting used by Assets fields.

@i-just i-just marked this pull request as ready for review November 28, 2023 14:23
Copy link
Contributor

@timkelty timkelty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@AugustMiller
Copy link
Contributor

Edited PR description to use new tempAssetUploadFs config name, for posterity! 💞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants