Laravel S3 | Move file from one directory to another with same Bucket

Problem Statement:

I am wondering if it is possible in Laravel 8 to move a stored file from one folder to another within AWS.

Exception has occurred.
GuzzleHttp\Exception\ClientException: 

Client error: `HEAD https://bucket-name.s3.us-east-2.amazonaws.com/case/9/609260ae9803b_1620205742/file.pdf` 

resulted in a `404 Not Found` response

Code Snippet


Storage::disk('s3')->move(
                            /temp/file.pdf,
                            /case/9/file.pdf                                 
                        );


If Yes, then can help to do the same?

Happy Coding



Read more here: https://stackoverflow.com/questions/67398490/laravel-s3-move-file-from-one-directory-to-another-with-same-bucket

Content Attribution

This content was originally published by Maqsud at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: