Skip to content

Instantly share code, notes, and snippets.

@z2015
Forked from anonymous/formData.js
Created May 9, 2016 07:55
Show Gist options
  • Save z2015/228ce98a47ca288332edc522ac1c5aeb to your computer and use it in GitHub Desktop.
Save z2015/228ce98a47ca288332edc522ac1c5aeb 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