Permalink
Browse files

fixed debug names

  • Loading branch information...
1 parent 4fd9b35 commit 0ff0092659cb085842fd0a567a07280aec2f9978 @coolaj86 committed Jan 13, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 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'));
}

0 comments on commit 0ff0092

Please sign in to comment.