debug asset migration

This commit is contained in:
Cassie Tarakajian 2017-07-11 11:51:56 -04:00
parent 3b36cd1e9c
commit 0bac435c72

View file

@ -30,6 +30,7 @@ Project.find({}, (err, projects) => {
const userId = project.user.valueOf(); const userId = project.user.valueOf();
project.files.forEach((file, fileIndex) => { project.files.forEach((file, fileIndex) => {
if (file.url && file.url.includes(process.env.S3_BUCKET) && !file.url.includes(userId)) { if (file.url && file.url.includes(process.env.S3_BUCKET) && !file.url.includes(userId)) {
console.log(file.url);
const key = file.url.split('/').pop(); const key = file.url.split('/').pop();
console.log(key); console.log(key);
const params = { const params = {