How to change the upload program for medium editor?

Writer
https://github.com/orthes/med.

cause
https://github.com/orthes/med.
I found the upload program in the upload plugin medium-editor-insert-plugin.js start at line 1589

label: "<span class="fa fa-camera"></span>",
            deleteMethod: "POST",
            // deleteScript: "delete.php",
            preview: true,
            // captions: true,
            // captionPlaceholder: "Type caption for image (optional)",
            autoGrid: 3,
            fileUploadOptions: { // See https://github.com/blueimp/jQuery-File-Upload/wiki/Options
                url: "/public/dist/editor/upload.php",
                acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
            },
            fileDeleteOptions: {},
            styles: {
                wide: {
                    label: "<span class="fa fa-align-justify"></span>"
                    // added: function ($el) {},
                    // removed: function ($el) {}
                },
                left: {
                    label: "<span class="fa fa-align-left"></span>"
                    // added: function ($el) {},
                    // removed: function ($el) {}
                },
                right: {
                    label: "<span class="fa fa-align-right"></span>"
                    // added: function ($el) {},
                    // removed: function ($el) {}
                },
                grid: {
                    label: "<span class="fa fa-th"></span>"
                    // added: function ($el) {},
                    // removed: function ($el) {}
                }
            },

I changed the upload program to his built-in upload program upload.php

and UploadHandler.php
https://. Github.com/orthes/med.

results
but even if I change the route, I won"t upload base64 to the editor even if I fail.
but isn"t it wrong to upload the base64, after uploading the video? I really can"t find out where the problem lies.
is that not the way to change it?

purpose
my final goal is that when I press upload, I can send a copy to the back end php , first process it, log the network address to the database, and then spit it back to the network address I processed and go back to editor
. Is this possible?


first of all, you need to put files such as upload.php on your PHP server.
if you set preview: true (Show an image before it is uploaded), then the preview will be displayed before uploading (it should be BASE64). After you finish uploading, save the content, and then see if the image in the saved content in the database is url.

Menu