Category : amazon-s3

Problem Statement: I am wondering if it is possible in Laravel 8 to move or copy a stored file from one directory to another within AWS. I tried below code but it is giving me following error. /temp/file.pdf => /case/9/file.pdf Exception Exception has occurred. GuzzleHttpExceptionClientException: Client error: `HEAD https://bucket-name.s3.us-east-2.amazonaws.com/case/9/file.pdf` resulted in a `404 Not Found` ..

Read more

PHP v7.4.16 I have a fairly basic stream filter (which extends php_user_filter), which I’m using to normalise CSV files as they’re transferred to another destination (s3 bucket using the stream wrapper in this case). Contents of filter() function: while ($bucket = stream_bucket_make_writeable($in)) { // Replace any CRLF Windows line-endings with *nix n $bucket->data = preg_replace(‘~(*BSR_ANYCRLF)R~’, ..

Read more

I have the following structure in my AWS S3 Buckets. With this code, I get the listing of ALL the objects under rootfolder/ My question is: How to list all the objects from the first level (colored in red.) With the following code below, i get an output like: rootfolder/hi.pdf rootfolder/creds.txt rootfolder/photo.png rootfolder/folder2/ rootfolder/folder2/creds2.txt rootfolder/folder2/account.pdf ..

Read more