Skip to content

Commit

Permalink
release 1.21.0: https is default, also ship previously contributed te…
Browse files Browse the repository at this point in the history
…sts for webp
  • Loading branch information
boutell committed Feb 11, 2023
1 parent c3c2741 commit 237af73
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion 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

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion lib/storage/s3.js
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion 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": {
Expand Down
2 changes: 2 additions & 0 deletions test/s3.js
Expand Up @@ -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');
Expand Down

0 comments on commit 237af73

Please sign in to comment.