Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#13547 closed New Feature (wontfix)

Popup on before uploadimage

Reported by: datalink Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

It is only an idea at the moment.

Maybe it is possible to open a little inline popup before uploading. So users can input their own variables to send with the request URL.

config.imageupload_enablePopup = true/false;
config.imageupload_popupSource = '<div>free html source</div>';

editor.on('beforeUploadimage', function() {
    if(imageupload_enablePopup)
        openPopup();
});

editor.on('closePopup', function() {
    uploadUrlExtension = '&myvar1=' + popupinput.var1 + '&myvar2=' + popupinput.var2;
});

editor.on('fileUploadRequest', function() {
    ...
    xhr.open( 'POST', fileLoader.uploadUrl + uploadUrlExtension, true );
    ...
});

This would be an easy way to send any variable to the server and back with the response if needed: alt and/or title attribute, css class, width/height or whatever.

Attachments (1)

plugin.js (7.1 KB) - added by datalink 9 years ago.
pastedupload plugin

Download all attachments as: .zip

Change History (3)

comment:1 Changed 9 years ago by Piotrek Koszuliński

Resolution: wontfix
Status: newclosed
Version: 4.5.1

User can change this values after the image is uploaded. We do not want to extend this functionality with additional features, to not complicate it too much. We are more focused on the architecture of uploading files to allow other developers to build extensions on top of it. Therefore, perhaps this is a place for a 3rd party plugin.

Changed 9 years ago by datalink

Attachment: plugin.js added

pastedupload plugin

comment:2 Changed 9 years ago by datalink

You are right. I spend some hours for it, copy the uploadimage plugin and do some changes. But it's hard to create a plugin for everybodies use. The user must adjust my result to own needs.

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