Angelo Chen
unread,Feb 3, 2012, 9:20:15 PM2/3/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nodejs
Hi,
following code works in centos 5.7 32 bits and OS X Lion 64 bits, but
failed in centos 6.2 64 bits, any idea?
the difference is, in 6.2 I installed node v0.6.10 while in others, I
use node v0.6.6
Thanks.
function move_tempfile_proc(f, p_id) {
console.log(f)
var path = f.path
var filename = settings.images_dir + "/" + f.filename
var resized_to = f.filename
fs.rename(path, filename, function(err) {
console.log(err) // got UNKNOWN error here
})
}
Express server listening on port 8080 in development mode
the object of uploaded file:
{ size: 4993730,
path: '/tmp/48504c73cf18f2ac409407ce4056a74c',
name: 'DSC02891.JPG',
type: 'image/jpeg',
lastModifiedDate: Sat, 04 Feb 2012 02:00:03 GMT,
_writeStream:
{ path: '/tmp/48504c73cf18f2ac409407ce4056a74c',
fd: 7,
writable: false,
flags: 'w',
encoding: 'binary',
mode: 438,
bytesWritten: 4993730,
busy: false,
_queue: [],
drainable: true },
length: [Getter],
filename: [Getter],
mime: [Getter] }
the err dump:
{ [Error: UNKNOWN, unknown error '/tmp/
48504c73cf18f2ac409407ce4056a74c']
errno: -1,
code: 'UNKNOWN',
path: '/tmp/48504c73cf18f2ac409407ce4056a74c' }