diff options
author | George Claghorn <george@basecamp.com> | 2018-02-26 15:22:20 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-02-26 17:20:55 -0500 |
commit | e0867b367202e2cb0a727da974f95ec5a7bfc098 (patch) | |
tree | a575316478a391e54b052188a1b5990eefbb20e7 /activestorage/app/javascript | |
parent | 9cf7e79fa28f43ff8eba4b921d0b453a9775924d (diff) | |
download | rails-e0867b367202e2cb0a727da974f95ec5a7bfc098.tar.gz rails-e0867b367202e2cb0a727da974f95ec5a7bfc098.tar.bz2 rails-e0867b367202e2cb0a727da974f95ec5a7bfc098.zip |
Clear Blob's type before sending it
Prevent older versions of Chrome from appending a Content-Type header containing the Blob type, rendering the request invalid if we intend not to provide a Content-Type. This behavior was observed in Chrome 58.
Diffstat (limited to 'activestorage/app/javascript')
-rw-r--r-- | activestorage/app/javascript/activestorage/blob_upload.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/javascript/activestorage/blob_upload.js b/activestorage/app/javascript/activestorage/blob_upload.js index 180a7415e7..277cc8ff8e 100644 --- a/activestorage/app/javascript/activestorage/blob_upload.js +++ b/activestorage/app/javascript/activestorage/blob_upload.js @@ -17,7 +17,7 @@ export class BlobUpload { create(callback) { this.callback = callback - this.xhr.send(this.file) + this.xhr.send(this.file.slice()) } requestDidLoad(event) { |