Skip to content

Instantly share code, notes, and snippets.

Created May 9, 2016 07:55
Show Gist options
  • Select an option

  • Save anonymous/ccd6ba0934855ec55f2ea405b92ee3ad to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/ccd6ba0934855ec55f2ea405b92ee3ad to your computer and use it in GitHub Desktop.

Revisions

  1. @invalid-email-address Anonymous created this gist May 9, 2016.
    5 changes: 5 additions & 0 deletions formData.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    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.