Skip to content

Instantly share code, notes, and snippets.

Created May 9, 2016 07:55
Show Gist options
  • Save anonymous/ccd6ba0934855ec55f2ea405b92ee3ad to your computer and use it in GitHub Desktop.
Save anonymous/ccd6ba0934855ec55f2ea405b92ee3ad to your computer and use it in GitHub Desktop.
Add blob filt to FormData
formData.append(name, value);
formData.append(name, value, filename);
//https://developer.mozilla.org/en-US/docs/Web/API/FormData/append
//The filename reported to the server (a USVString), when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment