Opened 8 years ago

Last modified 8 years ago

#13825 confirmed New Feature

Large files should not be previewed during upload.

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.0
Keywords: Cc:

Description (last modified by Jakub Ś)

Add-on to #13824

  1. Drop large file into editor e.g. 30MB image
  2. Try clicking in to editor

Result: Eeditor doesn't respond because it processes base64 string to display image in editor. Also the very important thing to notice is that upload of such file with preview feature used takes much much longer.

We should introduce configuration variable for maximum file size for which preview should be displayed. Any file above that size will be uploaded without the preview. Image will be displayed only after the file is fully uploaded to the server.

Change History (11)

comment:1 Changed 8 years ago by Jakub Ś

Description: modified (diff)

comment:2 Changed 8 years ago by Jakub Ś

Status: newconfirmed

comment:3 Changed 8 years ago by Piotr Jasiun

This is because uploadimage plugin use loadAndUpload option: http://docs.ckeditor.com/#!/api/CKEDITOR.fileTools.uploadWidgetDefinition-property-loadMethod

We could consider using upload for large file, so not showing the file preview. This could be done as an extension of this or as a separate plugin.

This ticket needs a investigation how large files upload works in browsers.

comment:4 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.5

comment:5 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.5CKEditor 4.5.6

comment:6 Changed 8 years ago by kkrzton

Owner: set to kkrzton
Status: confirmedassigned

comment:7 Changed 8 years ago by Piotr Jasiun

As I note here: http://dev.ckeditor.com/ticket/14230: The idea of the uploadImage was to make it super simple so one can replace it with different upload widget if one want to have a different behavior.

So, in fact, I do not like this ticket. In my opinion uploadImage should stay simple, we could have a tutorial how to handle big files or a separate plugin for it. If we will start to adding more and more config options to uploadImage users will not be ably anymore to take it, copy and change.

comment:8 Changed 8 years ago by Piotr Jasiun

And I am not sure if simple "not showing preview" is enough. To make big images work fine there should be a server side code which will resize them. Otherwise it does not make sense. And the uploadImage does not handle resized images yet.

comment:9 Changed 8 years ago by Piotr Jasiun

As we talked, resizing and not crashing are two different problems. But:

  1. I do not think this should be a config option. It should be a fixed value, user should not check what size it good to prevent browser crashing.
  2. Even if it will be one plugin we could consider two uploadWidgets to prevent having to many ifs in that code.

comment:10 Changed 8 years ago by kkrzton

Owner: kkrzton deleted
Status: assignedconfirmed

After some discussion about possible and simplest solution:

  1. Preview image is not shown for images large than X MB. For those images sample preview image is shown inside the placeholder.
  2. After image is successfully uploaded to the server, the placeholder is resized with the real image width/height.
  3. The resize operation (mentioned in 2.) should not be an undo step. Therefore using undo (e.g. Ctrl+Z) should not affect the size of an image.
Version 0, edited 8 years ago by kkrzton (next)

comment:12 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.6

This request needs further discussion, we'll get back to it later.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy