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

Assets dialog does not limit max_files #1313

Closed
rrelmy opened this Issue Mar 10, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@rrelmy

rrelmy commented Mar 10, 2017

Expected behaviour

The assets dialog should not allow selecting more files than the defined max_files from the Assets fieldtype

Actual behaviour

It is possible to select more files than allowed

Steps to reproduce

  1. Open assets dialog
  2. Select more files than max_files
  3. 😭

Server configuration

Operating system: macOS

Web server: Valet

PHP version: 7.2

Statamic version: 2.5.5

Updated from an older Statamic or fresh install: Updated

@rrelmy rrelmy changed the title from Assets dialog inside Replicator does not limit max_files to Assets dialog does not limit max_files Mar 14, 2017

@rrelmy

This comment has been minimized.

rrelmy commented Mar 14, 2017

Just realised it happens also outside of replicators

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Mar 14, 2017

Are you using max_files: "1" or max_files: 1?

Try changing it to the integer if its a string.

@rrelmy

This comment has been minimized.

rrelmy commented Mar 14, 2017

It was a string, after changing it to an int it works.

Adding an asset fieldtype through the interface saves max_files as string

@jasonvarga jasonvarga self-assigned this Mar 16, 2017

@jasonvarga jasonvarga closed this Mar 17, 2017

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