Socket
Socket
Sign inDemoInstall

@bytescale/upload-widget-angular

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bytescale/upload-widget-angular - npm Package Compare versions

Comparing version 9.9.0 to 9.10.0

4

package.json
{
"name": "@bytescale/upload-widget-angular",
"version": "9.9.0",
"version": "9.10.0",
"author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",

@@ -50,3 +50,3 @@ "description": "Angular File Upload UI Widget โ€” Lightweight & supports: drag and drop, multiple uploads, image cropping, customization & more ๐Ÿš€ Comes with Cloud Storage ๐ŸŒ",

"@angular/core": ">=13",
"@bytescale/upload-widget": "^4.18.0"
"@bytescale/upload-widget": "^4.20.0"
},

@@ -53,0 +53,0 @@ "module": "fesm2015/bytescale-upload-widget-angular.mjs",

@@ -289,2 +289,3 @@ <h1 align="center">

images: {
allowResizeOnMove: true, // True by default. If false, prevents cropper from resizing when moved.
preview: true, // True by default if cropping is enabled. Previews PDFs and videos too.

@@ -404,5 +405,5 @@ crop: true, // True by default.

## Authorization
## Authentication
Bytescale supports two types of authorization:
Bytescale supports two types of authentication:

@@ -415,5 +416,5 @@ ### API Keys

- Secret API keys (`secret_***`) have access to all API endpoints ([Bytescale JavaScript SDK](https://www.bytescale.com/docs/sdks/javascript)).
- Secret API keys (`secret_***`) can perform all API operations (see: [Bytescale JavaScript SDK](https://www.bytescale.com/docs/sdks/javascript)).
- Public API keys (`public_***`) have access to file upload, file download, and file listing API endpoints. File overwrites, file deletes, and all other destructive operations cannot be performed using public API keys. File listing is also disabled by default (but can be changed in the API key's settings).
- Public API keys (`public_***`) can perform file uploads and file downloads only. File overwrites, file deletes, and all other destructive operations cannot be performed using public API keys.

@@ -424,14 +425,12 @@ You must always use **public API keys** (e.g. `public_***`) in your client-side code.

### JWT Cookies
### JWTs
JWT cookies are optional.
JWTs are optional.
With JWT cookies, the user can download private files directly via the URL, as authorization is performed implicitly via a session cookie. This allows the browser to display private files in `<img>` and `<video>` elements.
With JWTs, users can download private files directly via the URL, as authentication is performed implicitly via a session cookie _or_ via an `authorization` header if service workers are enabled (see the `serviceWorkerScript` param on the `AuthManager.beginAuthSession` method). This allows the browser to display private files in `<img>`, `<video>`, and other elements.
With JWT cookies, the user can also upload files to locations that aren't otherwise permitted by the API key, but are permitted by the [JWT's payload](https://www.bytescale.com/docs/types/BytescaleJwt). This is because the [Bytescale Upload Widget](https://www.bytescale.com/docs/upload-widget) internally uses the [Bytescale JavaScript SDK](https://www.bytescale.com/docs/sdks/javascript) to perform file uploads, and the Bytescale JavaScript SDK automatically injects the user's JWT into all API requests once the `AuthManager.beginAuthSession` method has been called.
With JWTs, users can upload files to per-user folders. This is because the permissions in the [JWT's payload](https://www.bytescale.com/docs/types/BytescaleJwt) can be generated at runtime. The [Bytescale Upload Widget](https://www.bytescale.com/docs/upload-widget) internally uses the [Bytescale JavaScript SDK](https://www.bytescale.com/docs/sdks/javascript) to perform file uploads: the Bytescale JavaScript SDK handles the JWT refresh process with your API, requesting new JWTs when required, and includes your JWTs in all subsequent requests to the Bytescale API.
_Note: when using JWT cookies to download files, the `?auth=true` query parameter must be added to the URL._
[Learn more about the `AuthManager` and JWTs ยป](https://www.bytescale.com/docs/auth)
[Learn more about the `AuthManager` and JWT cookies ยป](https://www.bytescale.com/docs/authorization#jwt-cookie)
## UrlBuilder

@@ -438,0 +437,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc