Open
Description
When I attach an image, this is what req.file.image returns. The path does not include an extension although that seems to be where mongoose-attachments is grabbing the extension. Would it be better to grab it from name? Will that always include the extension?
Here's a returned file image object example:
{ domain: null,
_events: null,
_maxListeners: 10,
size: 39907,
path: '/var/folders/0p/j35t5_z11zj_qv9nnqqzvmtw0000gr/T/65bd99d6a382b583ad8e9b2c39728b76',
name: 'image-name.jpg',
type: 'image/jpeg',
hash: null,
lastModifiedDate: Sat Jun 29 2013 16:43:31 GMT-0700 (PDT),
_writeStream:
{ domain: null,
_events: null,
_maxListeners: 10,
path: '/var/folders/0p/j35t5_z11zj_qv9nnqqzvmtw0000gr/T/65bd99d6a382b583ad8e9b2c39728b76',
fd: 24,
writable: false,
flags: 'w',
encoding: 'binary',
mode: 438,
bytesWritten: 39907,
busy: false,
_queue: [],
_open: [Function],
drainable: true,
flush: [Function],
write: [Function],
end: [Function],
destroy: [Function],
destroySoon: [Function],
pipe: [Function],
setMaxListeners: [Function],
emit: [Function],
addListener: [Function],
on: [Function],
once: [Function],
removeListener: [Function],
removeAllListeners: [Function],
listeners: [Function] },
open: [Function],
toJSON: [Function],
write: [Function],
end: [Function],
setMaxListeners: [Function],
emit: [Function],
addListener: [Function],
on: [Function],
once: [Function],
removeListener: [Function],
removeAllListeners: [Function],
listeners: [Function] }