Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation fails when dynamic folder is set to id and min_files >= 1 #11181

Open
nopticon opened this issue Nov 27, 2024 · 1 comment
Open

Validation fails when dynamic folder is set to id and min_files >= 1 #11181

nopticon opened this issue Nov 27, 2024 · 1 comment

Comments

@nopticon
Copy link

Bug description

If you create an assets field with dynamic folder set to id and min_files = 1 or more, it shows an error message when creating a new entry.

Screenshot 2024-11-27 at 16 15 30

How to reproduce

Add this field to your blueprint and try saving the entry:

handle: assets_field
field:
  max_files: 1
  min_files: 1
  container: assets
  dynamic: id

Screenshot 2024-11-27 at 16 04 28

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 11.34.2
PHP Version: 8.3.14
Composer Version: 2.8.3
Environment: local
Debug Mode: ENABLED
URL: statamic.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.41.0 Solo

Installation

Fresh statamic/statamic site via CLI

Additional details

I suggest if Statamic could create a temporary folder to store assets. After the entry is created, the system moves those files to the dynamic id destination folder.

@duncanmcclean
Copy link
Member

Related: #10925

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

No branches or pull requests

2 participants