@bossino Not really, as S3 isn’t a “real” file system, so moving an object from /old-folder/foo.txt to /new-folder/foo.txt requires a CopyObject operation. So it’s important to pick a directory structure up front and then stick to it.
Jul 3, 2023
2
Level 1
Renaming a directory in S3
Hello. Is there a way that I can rename a s3 folder through code in Laravel. There are also a subfolder and files in that folder so renaming it would be easier than creating a new one and transfer other files. I tried this code below but it didn't work.
Storage::disk('s3')->rename('oldFol', 'newFol');
Please or to participate in this conversation.