Skip to content

Conversation

jacksleight
Copy link
Contributor

@jacksleight jacksleight commented Sep 26, 2025

This PR is a follow up to #6400 and second attempt at asset upload support in the user register and profile tags.

The implementation is fairly basic, but it's the most logical approach I can think of when using simple HTML file input fields. More advanced asset management would be great (particularly when dealing with multi-asset fields), but that's beyond the scope of this PR and may be more appropriate for an addon or custom implementation.

This works as follows:

  1. Asset fields can now be output in the register and profile forms
  2. If no files are uploaded the existing assets remain in place
  3. If files are uploaded they replace the existing assets
  4. There is a new config option delete_replaced_profile_form_assets
    • If false replaced assets are unlinked but remain in the container (default)
    • If true replaced assets are completely deleted from the container

As HTML file inputs are always blank by default there is no way to completely clear an assets field with this basic implementation. That would require sending some kind of extra hint(s) with the form submission, or a separate endpoint.

Part of my motivation for submitting this is that I'm deprecating my Memberbox addon, and this feature is pretty much the only reason anyone uses that. I think this should cover most basic use cases (it's already better than the version in my addon).

@jacksleight jacksleight changed the title [6.x] Add asset upload support to register and profile form [6.x] Add asset upload support to register and profile forms Sep 26, 2025
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.

1 participant