6.14.3 • Published 4 months ago

@uploadcare/signed-uploads v6.14.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Uploadcare Signed Uploads Client

This is Uploadcare Signed Uploads wrapper to work with Node.js.

API Reference

Build Status NPM version GitHub release Uploadcare stack on StackShare

Install

npm install @uploadcare/signed-uploads

Usage

NOTE: The Uploadcare API accepts expire as unix time in seconds. However, this library accepts time in milliseconds, as per the Node.js standard.

import { generateSecureSignature } from '@uploadcare/signed-uploads'

// by the expiration timestamp in milliseconds since the epoch
const { secureSignature, secureExpire } = generateSecureSignature('YOUR_SECRET_KEY', {
  expire: Date.now() + 60 * 30 * 1000 // expire in 30 minutes
})

// by the expiration date
const { secureSignature, secureExpire } = generateSecureSignature('YOUR_SECRET_KEY', {
  expire: new Date("2099-01-01") // expire on 2099-01-01
})

// by the lifetime in milliseconds
const { secureSignature, secureExpire } = generateSecureSignature('YOUR_SECRET_KEY', {
  lifetime: 60 * 30 * 1000 // expire in 30 minutes
})

A pair of secureSignature and secureExpire (string with a unixtime in seconds) can be passed directly to the corresponding options of @uploadcare/upload-client.

Security issues

If you think you ran into something in Uploadcare libraries that might have security implications, please hit us up at bugbounty@uploadcare.com or Hackerone.

We'll contact you personally in a short time to fix an issue through co-op and prior to any public disclosure.

Feedback

Issues and PRs are welcome. You can provide your feedback or drop us a support request at hello@uploadcare.com.

6.14.3

4 months ago

6.14.2

8 months ago

6.14.1

1 year ago

6.14.0

1 year ago

6.13.0

1 year ago

6.12.1

1 year ago

6.12.0

2 years ago

6.11.1

2 years ago

6.11.0

2 years ago

6.10.0

2 years ago

6.7.0

2 years ago

6.9.0

2 years ago

6.8.0

2 years ago

6.6.1

2 years ago

6.6.0

2 years ago

6.5.1

2 years ago

6.5.0

2 years ago

6.4.1

2 years ago

6.4.0

2 years ago

6.3.0

2 years ago