google-github-actions / upload-cloud-storage

A GitHub Action for uploading files to a Google Cloud Storage (GCS) bucket.
https://cloud.google.com/storage
Apache License 2.0
206 stars 49 forks source link

bug: fix an issue where mime types are not preserved #262

Closed sethvargo closed 2 years ago

sethvargo commented 2 years ago

Part of https://github.com/google-github-actions/upload-cloud-storage/issues/258

There's an issue with the NodeJS storage library in that it modifies the options passed to upload (/cc @bcoe), which then affects future uploads. The fix (after lots of debugging with @verbanicm) is to ensure we make a deep copy of the options before passing them to upload. This ensures our copy is not tainted when uploading the next object.