Skip to content
New issue

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

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

Already on GitHub? # to your account

Fineuploader error handling & reporting #516

Merged

Conversation

brentkelly
Copy link
Contributor

@brentkelly brentkelly commented Jun 1, 2017

Fineuploader silently fails by default when your server endpoint returns an error (wrong file type, too large, unwriteable upload dir etc). This PR adds support for displaying those errors in a user friendly way within the control.

To support this I also upgraded controls to be able to define css rules with the this.css array (so it now supports both externally linked CSS, as well as inline css rules).

Tested in chrome, edge, and firefox.

There were also a couple of other more obscure bugs in fineuploader that are fixed in this PR.

My formbuilder demo won't compile in IE so couldn't test there, but it's pretty standard jQuery so can't see why it wouldn't work (then again ... we are talking about IE!)

…int returns an error (e.g. extension errors, too large etc etc)
…ty. updated fineuploader to use this instead of inlining it in the HTML template - bit cleaner this way.
… what files were uploaded required javascript. This commit makes it work similar to the RTE controls which keep a hidden input synced with the desired output - in this case a list of the filenames uploaded to the server
@brentkelly
Copy link
Contributor Author

@kevinchappell - I added another commit to this PR. As I've started to use this in a project, I noticed it was missing some important features. This latest one is it wasn't actually outputting the names of the files uploaded to a hidden input or anything like that. So to get them, you had to interact with the fineuploader object over javascript etc. Doesn't really fit the pattern of other rich components like the RTE controls which work transparently with a form post using a hidden input. So I've upgraded this to do the same in 6660c20

@kevinchappell kevinchappell merged commit 409cd89 into kevinchappell:master Jun 7, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants