diff --git a/packages/ipfs-api/src/server.ts b/packages/ipfs-api/src/server.ts index e8db349c..f90d8691 100644 --- a/packages/ipfs-api/src/server.ts +++ b/packages/ipfs-api/src/server.ts @@ -123,6 +123,7 @@ async function reuploadFile(cid: string, recordsDB: Collection): Promis // download cid as file const filePath = `${UPLOAD_PATH}/${cid}.${ext}`; try { + console.log('starting download') await download(cid, filePath, isDir); } catch (error) { console.log('download error: ', error) @@ -132,7 +133,9 @@ async function reuploadFile(cid: string, recordsDB: Collection): Promis // upload the file let skylink; try { + console.log('starting upload') skylink = await uploadFile(filePath); + console.log('upload finsihed') } catch (error) { console.log('upload error: ', error) throw error; @@ -143,6 +146,7 @@ async function reuploadFile(cid: string, recordsDB: Collection): Promis // update record await recordsDB.updateOne({ cid }, { $set: { skylink } }); + console.log('database updated') return skylink; }