Skip to content

Fix max upload size error message#4203

Merged
jorgefilipecosta merged 1 commit intomasterfrom
fix/max-upload-size-error-message
May 22, 2018
Merged

Fix max upload size error message#4203
jorgefilipecosta merged 1 commit intomasterfrom
fix/max-upload-size-error-message

Conversation

@jorgefilipecosta
Copy link
Copy Markdown
Member

@jorgefilipecosta jorgefilipecosta commented Dec 29, 2017

Description

This PR aims to fix #3984. It improves media upload error handling, by showing a generic message when the upload fails, and by validating the max file size before starting the upload so we are not wasting resources try to send an invalid file to the server.

How Has This Been Tested?

Add an image block. Try to upload an image bigger than max file size upload limit. the value can be changed by adding this lines "php_value upload_max_filesize 3M / php_value post_max_size 3M" in .htaccess.
See that the correct error notice appears.

Screenshots (jpeg or gifs if applicable):

screen shot 2018-01-15 at 22 43 53

screen shot 2018-01-15 at 22 44 11

Types of changes

Added an onError handler to media handler. Used the handler to validate max file size and generic upload problems.
Passed max upload size from in client assets to allow max file size validation.
Added the ability for blocks to display error notices.

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

Labels

[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Imageblock Image over Update Limit

6 participants