Skip to content

Instantly share code, notes, and snippets.

@ekmartin
Created May 11, 2014 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekmartin/3721188ec02efa1a6f07 to your computer and use it in GitHub Desktop.
Save ekmartin/3721188ec02efa1a6f07 to your computer and use it in GitHub Desktop.
var article = new Article(parsedFields);
article.union = req.params.union;
article.image = files.file[0];
console.log('for', article.image, article.image.path, 'fil', files.file[0], files.file[0].path);
/* output:
for [object Object] undefined fil { fieldName: 'file',
originalFilename: '536a69d70368983f0c4bff23.png',
path: '/var/folders/_1/07xdf3092n79l_yjgsd7bmkc0000gn/T/16266-pr6udj.png',
headers:
{ 'content-disposition': 'form-data; name="file"; filename="536a69d70368983f0c4bff23.png"',
'content-type': 'image/png' },
ws:
{ _writableState:
{ highWaterMark: 16384,
objectMode: false,
needDrain: true,
ending: true,
ended: true,
finished: true,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
buffer: [],
errorEmitted: false },
writable: true,
domain: null,
_events: { error: [Object], close: [Object] },
_maxListeners: 10,
path: '/var/folders/_1/07xdf3092n79l_yjgsd7bmkc0000gn/T/16266-pr6udj.png',
fd: null,
flags: 'w',
mode: 438,
start: undefined,
pos: undefined,
bytesWritten: 1748191,
closed: true },
size: 1748191 } /var/folders/_1/07xdf3092n79l_yjgsd7bmkc0000gn/T/16266-pr6udj.png
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment