k1LoW / serverless-s3-sync

A plugin to sync local directories and S3 prefixes for Serverless Framework :zap:
182 stars 68 forks source link

fix: syncMetadata now takes into account that matched files can have a bucketPrefix #94

Closed JoaquinFernandez closed 2 years ago

JoaquinFernandez commented 2 years ago

What has been implemented?

When bucketPrefix is specified in options, the files are correctly copied with the prefix in the s3 bucket. If you also specify metadata in params, then syncMetadata copies objects with the REPLACE directive with them, however, it does not take into account the bucketPrefix specified.

In order to overcome that I've added the bucketPrefix to the Key without a leading / and with an ending /

Closes #86 #57

Steps to verify

k1LoW commented 2 years ago

@JoaquinFernandez Thank you !!