Multipart upload directory #243

Merged
bones7242 merged 5 commits from multipart-upload-directory into upload-refactor 2017-11-07 01:05:04 +01:00
Showing only changes of commit 1f37c33206 - Show all commits

View file

@ -22,6 +22,7 @@ module.exports = {
} }
}) })
.then(channel => { .then(channel => {
// set channel information
certificateId = null; certificateId = null;
channelName = null; channelName = null;
if (channel) { if (channel) {
@ -61,12 +62,12 @@ module.exports = {
certificateId, certificateId,
channelName, channelName,
}; };
// upsert File record (update is in case the claim has been published before by this daemon) // upsert criteria
const upsertCriteria = { const upsertCriteria = {
name : publishParams.name, name : publishParams.name,
claimId: publishResults.claim_id, claimId: publishResults.claim_id,
}; };
// create the records // upsert the records
return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]); return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);
}) })
.then(([file, claim]) => { .then(([file, claim]) => {