-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Small images upload, large images do not (Size 0?) #240
Comments
I tried to set the default handler to FILE_UPLOAD_HANDLERS = [
"django.core.files.uploadhandler.MemoryFileUploadHandler",
# "django.core.files.uploadhandler.TemporaryFileUploadHandler",
] but no luck. As far as I can tell, the image is simply not being uploaded correctly (i.e.,
|
This is happening with a signed in user, however, the behavior is completely reproducible (small images upload and save, large images do not). It occurs both in production and on a restarted development server. Is there anything I can do to illuminate what the problem is? |
@tuhe I tried reproducing it with your steps with the example blog app in this repo and I can successfully upload the image via the upload button and via copy and paste. Maybe some more information about browser and operating system would be helpful |
@tuhe most likely the problem is in |
Hi!
Thank you for your work on the plugin. I am using the plugin using the default setup from the README outside of the django admin. I can upload / see small images without any problems, but if I copy-paste a large image (i.e. a desktop wallpaper or similar) I get a pop-up error: "Couldn't upload file: image.png.". The error arise from the code
Image.open(f)
in:https://github.com/hvlads/django-ckeditor-5/blob/master/django_ckeditor_5/views.py#L57
and I think it is because
f.size
show 0 bytes (this is not the case for small images). My best guess is that this might be happening on the frontend, perhaps due to a limit (?), but I cannot find an option to set in thesettings.py
file (changingCKEDITOR_5_MAX_FILE_SIZE = 10
does not do anything but my understanding is also that the default is infinite size). Other parts of the application has no problem with large files (100 mb) so I don't think it is a middleware issue or similar. Any help would be greatly appreciated!The text was updated successfully, but these errors were encountered: