Skip to content

Releases: ChenglongMa/skipper-gcstorage

v2.3.1

12 Aug 11:38
Compare
Choose a tag to compare
Update README.md

v2.3.0

12 Aug 07:22
Compare
Choose a tag to compare

Changelog

  1. Add keepName option which can set whether to use the original filename or a generated UUID name.
  2. Update dependencies to the latest version.

v2.2.0

04 Nov 10:58
Compare
Choose a tag to compare

Changelog

  1. Update dependencies to the latest versions.

v2.1.1

14 May 13:15
Compare
Choose a tag to compare

Changelog

  1. Fixed the bug that options.metadata can be undefined.

v2.1.0

08 Dec 12:55
Compare
Choose a tag to compare

Thanks jspark-gigworks (Anselmo Park) so much for his comments!

  1. Emitwritefile event when finishing the job.
  2. Support additional CreateWriteStreamOptions listed in https://googleapis.dev/nodejs/storage/latest/global.html#CreateWriteStreamOptions.

v2.0.0

13 Nov 04:03
Compare
Choose a tag to compare

Changelog

Ver 2.0.0

  1. Add resize options, which can compress the images before uploading.
        req.file('avatar')
        .upload({
          // Required
          adapter: require('skipper-gcstorage'),
          bucket: 'existing_or_new_bucket_name', // Will create new one if no such bucket exists.
          // Optional
          projectId: 'GOOGLE_CLOUD_PROJECT', // Mandatory if `keyFilename` was specified.
          keyFilename: '/path/to/GOOGLE_APPLICATION_CREDENTIALS.json', 
          bucketMetadata: {
            location: 'us-west1',
          },  // Refer to https://googleapis.dev/nodejs/storage/latest/global.html#CreateBucketRequest
          maxBytes: 60000, 
          metadata: {},
          public: true,
>>>>      resize: {                                                         // <<<<<<<<<<<<< new feature
            width: 500,
            height: 500
          }, // Refer to https://sharp.pixelplumbing.com/api-resize#resize
        }, function whenDone(err, uploadedFiles) {
          if (err) {
            return res.serverError(err);
          }
          return res.ok({
            files: uploadedFiles,
            textParams: req.params.all()
          });
        });

v1.0.1

19 Oct 11:37
Compare
Choose a tag to compare

Changelog

  1. Fixed the bug that files cannot be uploaded to the newly created bucket.

v1.0.0

15 Oct 23:53
Compare
Choose a tag to compare

Please refer to README for more details