I'm seeing a weird error in using box SDK to get a share link for a file. In my code I upload the file (replacing existing file), and then request a share link to the file. I get the share link which is valid. Then a few seconds later I get an exception from the call that had completed of "updateRedirectionMapping is not defined". It is really weird. Is there something that I'm doing wrong? Has anyone seen this error?
console.log('file uploaded ' + e.dir + e.file)
settings.uploadFile -= 1
settings.getLink += 1
e.boxID = res.entriese0].id
e.data.status = 'getting box share'
settings.client.files.update(e.boxID, {
shared_link: settings.access
}).then(function (file) {
settings.getLink -= 1
console.log('box complete for ' + e.dir + e.file, file, file.shared_link.url)
e.data.status = 'box complete'
e.data.boxLink = file.shared_link.url
settings.totalCompleted += 1
settings.success()
}).catch(function (err) {
console.log('box failed to get link for ' + e.dir + e.file, err)
e.data.status = 'box failed'
settings.getLink -= 1
settings.failure(err)
})
Here is the console log from this:
migrateToBox.js:111
Object {type: "file", id: "***number removed for privacy***541", file_version: Object, sequence_id: "6", etag: "6", …}
migrateToBox.js:111
https://app.box.com/s/84zn4w59onu1486vgdsy6ar9adjcjjkl
migrateToBox.js:111
box failed to get link for ./static_content/***email address removed for privacy***/Mobility Tool-Enabled Best Practices for Design & Development - Brown bag Collaboration Session/Additional Files/Presentation.pptx
migrateToBox.js:117
ReferenceError: updateRedirectionMapping is not defined
migrateToBox.js:117