Upload images in order (Drag and drop)

Hello world !,

Guys how can i upload images in order by Drag and Drop ? I know the plugin “FileInput” but i can’t change the order before upload the images

Thanks! :chile:

Maybe https://plugins.krajee.com/file-input#features can help?

i solved with “filesorted” event, i send post with the params “params.previewId, params.oldIndex, params.newIndex, params.stack” and resort in the backend. I don’t know if this is the best way but works fine

                    'pluginEvents' => [
                    'filesorted' => 'function(event, params) {
                        var orden = new Object();
                        orden["new"]= params.newIndex;                
                         $.post("http://localhost/bitbucket/controller/view", {suggest: orden}, function(result){
                            if(result.success == "ok")
                        console.log("File sorted ", params.previewId, params.oldIndex, params.newIndex, params.stack);