1

I receive paste image from clipboard, get a object like this:

Due to security reason, I cannot add it into a <input>. I tried to upload it directly with jquery post, like

var d=new FormData()

d.append('blob',blob.__proto__);

contentType: false,processData: false,

but just post a [Object File] to the server. So how can I post it as a normal image?

Tac
  • 325
  • 3
  • 11
  • The so-called duplicate question is in no way related to the question asked here (which is about how to get a file object from the clipboard, not from a file input). – Quentin Feb 06 '19 at 08:07

1 Answers1

1

You are pulling the File constructor function out of the File object's prototype and trying to upload that.

You need to upload the actual File object.

d.append('blob',blob);
Quentin
  • 857,932
  • 118
  • 1,152
  • 1,264