Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed debug names

  • Loading branch information...
commit 0ff0092659cb085842fd0a567a07280aec2f9978 1 parent 4fd9b35
@coolaj86 authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 examples/upload-client.js
View
10 examples/upload-client.js
@@ -23,15 +23,17 @@
function encodeBody() {
formData.setNodeChunkedEncoding(chunked);
- formData.append('nam0', 'AJ');
+ // field portion
+ formData.append('name', 'AJ');
formData.append('name', 'ONeal');
- formData.append('favs0]', 'Blue');
+ formData.append('favs[]', 'Blue');
formData.append('favs[]', 'Wednesday');
formData.append('email', 'coolaj86@gmail.com');
+ // file portion
formData.append('avatar', new File(__dirname + '/../files/smiley-cool.png'));
- formData.append('file0', new File(__dirname + '/../files/file1.txt'));
+ formData.append('files', new File(__dirname + '/../files/file1.txt'));
formData.append('files', new File(__dirname + '/../files/file2.txt'));
- formData.append('attachments0]', new File(__dirname + '/../files/file1.txt'));
+ formData.append('attachments[]', new File(__dirname + '/../files/file1.txt'));
formData.append('attachments[]', new File(__dirname + '/../files/file2.txt'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.