S3 plugin concatenates source and target file path

i’m trying to upload a file to the root directory, but seems like the plugin is concatenating the file paths and creating all the parent directory from my source too.
for example:

source: swagger/v1/swagger.json
target: /

I would expect the plugin to upload the file as /swagger.json on the root of my bucket, but instead it is uploading as /swagger/v1/swagger.json instead.

Is there anyway for the plugin to work for my use case?

I would expect the plugin to upload the file as /swagger.json on

The plugin makes no assumptions regarding upload path because it handles path globbing and pattern matching, which makes such a task difficult (if not impossible). You therefore need to use the strip_prefix parameter. You can see an example here http://plugins.drone.io/drone-plugins/drone-s3/