Skip to main content

How to copy file to an other disk

Use the storage manager to copy or move files from one disk to an other disk.

// copy
await Storage.disk('s3').writeStream('foo.jpg', Storage.disk('assets').readStream('foo.jpg'));

// delete old version (move)
await Storage.disk('assets').deleteFile('foo.jpg');