Skip to content

Pasting a picture from the clipboard after pasting a picture URL from the clipboard #248

@mkkkjhn

Description

@mkkkjhn

hey! I found a problem I haven't found a solution to yet.

When I use the "Uploading by pasted URL" script to paste a copied file from the clipboard, I run into an unusual problem. The file is passed inside the POST request incorrectly.

Below I will show this story in screenshots:

  1. First, I copy the picture "as file" and paste it into the editor. Payload of the request looks like this:
    debug1

  2. Next, I paste the picture into the editor by copying and pasting its URL

  3. Finaly, I copy the picture "as file" and paste it into the editor again. And here is how the request payload looks like in this case:
    debug2

my server to which I make a request responds that it can't find the value of the "file" key. This name is specified in my config as "field". The problem looks like something goes wrong in the "uploadByFile" function (on the screen) when forming the "formData" object. I logged the contents of this object right before the request and it looks identical in both scenarios, which is just confusing:
image

Please help with the investigation of this bug, I am suffering a lot because of it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions