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

Errors for too large of a file are insufficent #2932

Closed
Shelob9 opened this issue Jan 24, 2019 · 1 comment
Closed

Errors for too large of a file are insufficent #2932

Shelob9 opened this issue Jan 24, 2019 · 1 comment
Assignees
Labels
Bug Has PR Bug/Feature with a PR created for it.
Milestone

Comments

@Shelob9
Copy link
Collaborator

Shelob9 commented Jan 24, 2019

File size limitation is added in #2823 to fix #1399

A file that is too large should be rejected in the client when its added.

It is already rejected server side resulting in an error response here -- https://github.com/CalderaWP/Caldera-Forms/blob/develop/cf2/RestApi/File/CreateFile.php#L126-L134

Let's make sure that if a file is added to a field that is too large -- an error is shown on the field and the offending item in the list is highlighted in red and the form can't be submitted until its removed. It's tempting to say it should just not add that file, but then a user might add a file, see it didn't get added, add it again, see it didn't get added and get annoyed. They should see what is wrong clearly.

Let's make sure if file upload fails, it opens that notice and stops form submission -- second part is already covered.
https://github.com/CalderaWP/Caldera-Forms/blob/master/assets/js/ajax-core.js#L82

@Shelob9 Shelob9 added the Bug label Jan 24, 2019
@Shelob9 Shelob9 added this to the 1.8.0 milestone Jan 24, 2019
@New0 New0 added Has PR Bug/Feature with a PR created for it. and removed Has PR Bug/Feature with a PR created for it. labels Jan 29, 2019
@New0 New0 added the Has PR Bug/Feature with a PR created for it. label Feb 6, 2019
@New0
Copy link
Collaborator

New0 commented Feb 6, 2019

Closed via a3cd7f6

@New0 New0 closed this as completed Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Has PR Bug/Feature with a PR created for it.
Projects
None yet
Development

No branches or pull requests

2 participants