diff --git a/CHANGELOG.md b/CHANGELOG.md index b92b65b..382848c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Changelog -## Unreleased +## 1.21.0 2023-02-11 * Adds tests for `webp` files, updates the package scripts to include "webp" to run the tests, and a webp test image (Note: one test commented out because `sharp` currently fails to reorient webp files). Thanks to [Isaac Preston](https://github.com/ixc7) for this contribution. +* `https` is now the default protocol for S3. As it is always supported and there are no uploadfs+S3 use cases where `http` is preferred this is not considered a bc break. ## 1.20.1 2022-12-13 @@ -14,6 +15,7 @@ * Support for jimp and imagecrunch removed (added fallback to sharp for bc) * imagemagick is now the fallback if sharp installation fails on a particular platform * tests for sharp have been added and the package scripts updated to add "test-sharp" + ## 1.19.0 2022-01-21 * New options `noGzipContentTypes` and `addNoGzipContentTypes` to configure content types which should not be gzipped when using the `s3` storage backend. Thanks to Christian Litzlbauer. diff --git a/README.md b/README.md index fb80f14..ced2acd 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ When you successfully copy an image into uploadfs with copyImageIn, the second a `originalHeight` (not rotated) -`extension` (`gif`,`jpg` or `png`) +`extension` (`gif`,`jpg`, `webp` or `png`) You should record these properties in your own database if you need access to them later. diff --git a/lib/storage/s3.js b/lib/storage/s3.js index 9389008..f9c96ac 100644 --- a/lib/storage/s3.js +++ b/lib/storage/s3.js @@ -75,7 +75,7 @@ module.exports = function() { } else { contentTypes = defaultTypes; } - https = options.https; + https = (options.https === undefined) ? true : options.https; cachingTime = options.cachingTime; self.options = options; return callback(null); diff --git a/package.json b/package.json index fc83d8f..0adf81f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uploadfs", - "version": "1.20.1", + "version": "1.21.0", "description": "Store files in a web-accessible location via a simplified API. Can automatically scale and rotate images. Includes S3, Azure and local filesystem-based backends with the most convenient features of each.", "main": "uploadfs.js", "scripts": { diff --git a/test/s3.js b/test/s3.js index 00a960c..f177b8a 100644 --- a/test/s3.js +++ b/test/s3.js @@ -207,6 +207,8 @@ describe('UploadFS S3', function () { setTimeout(() => { const url = uploadfs.getUrl(); + // Default should be https + assert(url.startsWith('https://')); const paths = [ info.basePath + '.jpg' ]; paths.push(info.basePath + '.tiny.jpg');