What are the advantages of providing metadata when inserting object into S3 AWS?

Asked

Viewed 50 times

0

In the AWS SDK for PHP v3 the method putObject receives several parameters, such as Contenttype, Contentencoding, etc.

In its simplest form, I can insert an object only stating Bucket, Key and SourceFile.

$result = $s3->putObject(array(
    'Bucket'       => $bucket,
    'Key'          => $keyname,
    'SourceFile'   => $filepath
));

Taking into account that I will insert photos and that they should stay on S3 until I want to delete them, what are the advantages/disadvantages of me also passing metadata as ContentType, ContentEncoding among others?

In the simplest format, passing only Bucket, Key and SourceFile you’ll be taking my case?

1 answer

1


Using metadata you can store other information with the image, such as the owner, insertion date, useable application, or any other information that may be useful for application to get next to the file itself. In addition, some metadata are mapped to HTTP headers such as Contenttype, Encoding, Cache Control, etc...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.