ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Image upload not adding incomplete URL to document.

Open seaniemc opened this issue 7 years ago • 1 comments

I created a custom image upload adopter, which works fine and I can upload an image to my server which then gets added to a 3rd party vendor. The JSON returned from the server does not contain a valid URL for the image.

Currently, in the document's which we edit the images call our server endpoint in the following format. src="/imgAttachment?sys_id=xxxxxxxxxxxxxxxx" This will hit our server endpoint which calls our vendor and retrieves the image.

In my upload function, I create the URL as described above.

upload() {
    let upload = new Promise((resolve, reject)=>{
      this.loader.file.then(
          (data)=>{
              this.uploadFile(data)
              .subscribe(
                  (result)=>{
                    resolve({ default:'/imgAttachment/?sys_id=' + result.result.sys_id});
                  },
                  (error)=>{
                      reject(data.msg);
                  }
              );
          }
      );
    });
    return upload;

So my question is can the editor add image URL's which are not complete, is there a way I can override or set a configuration in order for this to happen.

seaniemc avatar Sep 06 '19 11:09 seaniemc

@Mgsy Can you have a quick look at this?

seaniemc avatar Sep 09 '19 10:09 seaniemc