The module is working well with images, but if I try to upload files (pdf, docx, etc..), the transfer stops at 100% and file isn't saved. I have then this kind of error:
Image upload failed for: sites/default/files/simpleuploads/BBweb.pdf
The specified file BBweb.pdf could not be uploaded. Only JPEG, PNG and GIF images are allowed.
Notice: Undefined variable: url in _ckeditor_simpleupload() (line 132 of /home/www/dev/erpal1/sites/all/modules/ckeditor_simpleuploads/ckeditor_simpleuploads.module).
Image upload failed for: sites/default/files/simpleuploads/NewDocumentMicrosoftWord.doc
The specified file NewDocumentMicrosoftWord.doc could not be uploaded. Only JPEG, PNG and GIF images are allowed.
Notice: Undefined variable: url in _ckeditor_simpleupload() (line 132 of /home/www/dev/erpal1/sites/all/modules/ckeditor_simpleuploads/ckeditor_simpleuploads.module).
Neither the button or the drag & drop feature are working for docs. Images are working perfectly in both cases
Comments
Comment #1
bwaindwainThis is because file_validate_is_image() is being called in _ckeditor_simpleupload() which then calls image_get_info().
I know this isn't a solution, but maybe this helps someone along the way.
This module seems much less restrictive (I haven't tried it): https://github.com/stephenunderwood/drupal7-simpleuploads
Comment #2
bwaindwainHere's a patch that extends the module to accept more file types. It adds an admin field to specify extensions.
It also makes use of hook_ckeditor_settings_alter() so that it works better with ckeditor
Comment #3
bwaindwainComment #4
bwaindwainfixed typo
Comment #5
bwaindwainhere's a patch that allows for more than 128 chars