Since 2 Oct, when we upload a file to QuickBooks and map it to a bill, the QBO display filename is blank.
I suggest add FileName when updateAttachable. Can you review it?
QuickBooks.prototype.upload = function(filename, contentType, stream, entityType, entityId, callback) { var that = this var opts = { url: '/upload', formData: { file_content_01: { value: stream, options: { filename: filename, contentType: contentType } } } } module.request(this, 'post', opts, null, module.unwrap(function(err, data) { if (err || data[0].Fault) { (callback || entityType)(err || data[0], null) } else if (_.isFunction(entityType)) { entityType(null, data[0].Attachable) } else { var id = data[0].Attachable.Id that.updateAttachable({ Id: id, SyncToken: '0', **FileName: filename,** AttachableRef: [{ EntityRef: { type: entityType, value: entityId + '' } }] }, function(err, data) { callback(err, data) }) } }, 'AttachableResponse')) }
Since 2 Oct, when we upload a file to QuickBooks and map it to a bill, the QBO display filename is blank.
I suggest add FileName when updateAttachable. Can you review it?
QuickBooks.prototype.upload = function(filename, contentType, stream, entityType, entityId, callback) { var that = this var opts = { url: '/upload', formData: { file_content_01: { value: stream, options: { filename: filename, contentType: contentType } } } } module.request(this, 'post', opts, null, module.unwrap(function(err, data) { if (err || data[0].Fault) { (callback || entityType)(err || data[0], null) } else if (_.isFunction(entityType)) { entityType(null, data[0].Attachable) } else { var id = data[0].Attachable.Id that.updateAttachable({ Id: id, SyncToken: '0', **FileName: filename,** AttachableRef: [{ EntityRef: { type: entityType, value: entityId + '' } }] }, function(err, data) { callback(err, data) }) } }, 'AttachableResponse')) }