I am just starting with the AWS S3 SDK for PHP, I managed to load the folder of elements from my PC into the s3 bucket using PHP, is there any way to specify the folder inside this bucket, for example, instead of loading image.jpg into imagebucket, it loads to the image folder inside the "imagebucket".
Aws s3 lacks the concept of folders. Its just for the display used by Amazon AWS UI.
In fact, it saves the file name as a key and data as a value.
if you store 5 files with different folders, they are not going to create 5 folders.
From the docs:
public function uploadDirectory($directory, $bucket, $keyPrefix = null, array $options = array())
By specifying $ keyPrefix, you can force downloaded objects to fit under the virtual folder into the Amazon S3 bucket. For example, if $ bucket name is my-bucket and $ keyPrefix is 'testing /', then your files will be uploaded to my container in the test / virtual folder: https://my-bucket.s3.amazonaws.com/testing/ filename.txt
See: http://docs.aws.amazon.com/aws-sdk-php/guide/latest/service-s3.html#uploading-a-directory-to-a-bucket
Source: https://habr.com/ru/post/917104/More articles:Static variables in javascript class - javascriptLoad javascript sequentially from javascript code - javascriptWhat is the fastest way to parse a JSON string in a SQLite table? - jsonCannot connect to remote ipcluster - TimeoutError - ipythonPre and Post Build Event Parameters - c #Tools for checking memory fragmentation - memory-managementGenerate an array from a comma separated list - PHP - stringSocketAsyncEventArgs buffer filled with zeros - c #Django models not showing up in DB after syncdb - djangojQuery.on () vs binding event to selector? - jqueryAll Articles