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

0

No AWS SDK for PHP v3 the method putObject receives various parameters, such as ContentType, ContentEncoding, etc.

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

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

Considering that I'm going to insert photos and that they should stay in s3 until I want to delete them, what are the advantages / disadvantages of passing metadata like ContentType , ContentEncoding among others?

In the simplest format, passing only Bucket , Key and SourceFile will answer my case?

    
asked by anonymous 09.02.2017 / 15:55

1 answer

1

By using metadata you can store other information with the image, such as the owner, insert date, usable application, or any other information that might be useful to get from the file itself. In addition, some metadata is mapped to HTTP headers, such as ContentType, Encoding, Cache Control, etc ...

    
14.02.2017 / 05:12