Fix cypress tests

This commit is contained in:
roschaefer 2020-03-22 16:45:48 +01:00 committed by mattwr18
parent 32da8b2982
commit e9bd969f0a

View File

@ -109,10 +109,11 @@ const sanitizeRelationshipType = (relationshipType) => {
}
}
const localFileUpload = ({ createReadStream, destination }) => {
const localFileUpload = ({ createReadStream, uniqueFilename }) => {
const destination = `/uploads/${uniqueFilename}`
return new Promise((resolve, reject) =>
createReadStream()
.pipe(createWriteStream(`public/uploads/${destination}`))
.pipe(createWriteStream(`public${destination}`))
.on('finish', () => resolve(destination))
.on('error', reject),
)