Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mkkkjhn opened this issue May 22, 2024 · 1 comment

Comments

@mkkkjhn
Copy link

mkkkjhn commented May 22, 2024

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

@neSpecc
Copy link
Contributor

neSpecc commented May 22, 2024

I'm not sure about it. If you have a time, please, debug it deeper. I'll try to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants