1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

directory separator

This commit is contained in:
Damodar Lohani 2022-01-16 17:23:02 +05:45
parent 4b3e461928
commit 16c0a7c544

View file

@ -596,7 +596,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
// Save to storage
$size = $device->getFileSize($file['tmp_name']);
$path = $device->getPath(\uniqid().'.'.\pathinfo($file['name'], PATHINFO_EXTENSION));
$path = $bucket->getId() . '/' . $path;
$path = $bucket->getId() . DIRECTORY_SEPARATOR . $path;
if (!$device->upload($file['tmp_name'], $path)) { // TODO deprecate 'upload' and replace with 'move'
throw new Exception('Failed moving file', 500);