Commit e072c2a7 authored by A. Koch's avatar A. Koch

remove archives after upload to asset store

parent a3f07aea
......@@ -173,6 +173,7 @@ module.exports.createArchive = async (data) => {
opts.port = config.assets.client.port ? parseInt(config.assets.client.port) : undefined
const minioClient = new Minio.Client(opts)
await minioClient.fPutObject(config.assets.archivesBucket, path.basename(archivePath), archivePath, { 'Content-Type': 'application/zip' })
await fs.unlink(archivePath)
const url = await minioClient.presignedGetObject(config.assets.archivesBucket, path.basename(archivePath))
return url
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment