Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More โ†’
Socket
Sign inDemoInstall
Socket

upload-js

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

upload-js - npm Package Compare versions

Comparing version 2.21.0 to 2.22.0

8

dist/main.js

@@ -521,3 +521,3 @@ module.exports =

var authMutex = Mutex();
var apiUrl = (_b = (_a = config.internal) === null || _a === void 0 ? void 0 : _a.apiUrl) !== null && _b !== void 0 ? _b : "https://api.upload.io";
var apiUrl = (_b = (_a = config.internal) === null || _a === void 0 ? void 0 : _a.apiUrl) !== null && _b !== void 0 ? _b : "https://api.bytescale.com";
var cdnUrl = (_d = (_c = config.internal) === null || _c === void 0 ? void 0 : _c.cdnUrl) !== null && _d !== void 0 ? _d : "https://upcdn.io";

@@ -551,4 +551,4 @@ var authenticateWithApiKey = (_f = (_e = config.internal) === null || _e === void 0 ? void 0 : _e.authenticateWithApiKey) !== null && _f !== void 0 ? _f : true;

throw new Error("".concat(logPrefix, "API key needs trimming (whitespace detected)."));
} // Non-api-key authentication is required by Upload Dashboard, which uses bearer tokens instead of API keys because
// the user may not have any active API keys, but might still want to upload files via the Upload Dashboard.
} // Non-api-key authentication is required by Bytescale Dashboard, which uses bearer tokens instead of API keys because
// the user may not have any active API keys, but might still want to upload files via the Bytescale Dashboard.

@@ -1062,3 +1062,3 @@

throw new Error("".concat(logPrefix, "Network error. If problem persists, and your network connectivity is healthy, please contact support@upload.io and provide: (a) time of failed request in UTC (b) screenshot of failed network response body (c) screenshot of failed network response header (d) browser + version."));
throw new Error("".concat(logPrefix, "Network error. If problem persists, and your network connectivity is healthy, please contact support@bytescale.com and provide: (a) time of failed request in UTC (b) screenshot of failed network response body (c) screenshot of failed network response header (d) browser + version."));
};

@@ -1065,0 +1065,0 @@

@@ -9,3 +9,3 @@ import { UploadedFile } from "./UploadedFile";

*
* Allows the user to perform authenticated uploads and/or downloads to the Upload CDN.
* Allows the user to perform authenticated uploads and/or downloads to the Bytescale CDN.
*

@@ -12,0 +12,0 @@ * You must await the promise before attempting to perform any uploads or downloads that require authentication.

{
"name": "upload-js",
"version": "2.21.0",
"author": "Upload <hello@upload.io> (https://upload.io)",
"version": "2.22.0",
"author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
"description": "File Upload Library โ€” Upload.js gives developers AJAX multipart file uploading via XHR ๐Ÿš€ Comes with Cloud Storage ๐ŸŒ",

@@ -9,10 +9,10 @@ "license": "MIT",

"types": "dist/index.d.ts",
"homepage": "https://upload.io/upload-js",
"homepage": "https://www.bytescale.com/upload-js",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/upload-io/upload-js.git"
"url": "git+https://github.com/bytescale/upload-js.git"
},
"bugs": {
"url": "https://github.com/upload-io/upload-js/issues"
"url": "https://github.com/bytescale/upload-js/issues"
},

@@ -46,4 +46,4 @@ "files": [

"dependencies": {
"@upload-io/upload-api-client-upload-js": "^2.15.0",
"progress-smoother": "^1.4.0"
"@upload-io/upload-api-client-upload-js": "^2.18.0",
"progress-smoother": "^1.7.0"
},

@@ -50,0 +50,0 @@ "devDependencies": {

<h1 align="center">
<a href="https://upload.io/upload-js">
<img alt="Upload.js" width="315" height="93" src="https://raw.githubusercontent.com/upload-io/upload-js/main/.github/assets/logo.svg">
<a href="https://www.bytescale.com/upload-js">
<img alt="Upload.js" width="315" height="93" src="https://raw.githubusercontent.com/bytescale/upload-js/main/.github/assets/logo.svg">
</a>
</h1>
<p align="center"><b>JavaScript File Upload Library</b><br/> (With Integrated Cloud Storage)</p>
<p align="center"><b>JavaScript File Upload Library</b><br/>(With Integrated Cloud Storage)</p>
<br/>
<p align="center">
<a href="https://github.com/upload-io/upload-js/">
<a href="https://github.com/bytescale/upload-js/">
<img src="https://img.shields.io/badge/gzipped-6%20kb-4ba0f6" />

@@ -17,3 +17,3 @@ </a>

<a href="https://github.com/upload-io/upload-js/actions/workflows/ci.yml">
<a href="https://github.com/bytescale/upload-js/actions/workflows/ci.yml">
<img src="https://img.shields.io/badge/build-passing-4ba0f6" />

@@ -31,7 +31,7 @@ </a>

<a href="https://github.com/upload-io/upload-js/actions/workflows/ci.yml">
<a href="https://github.com/bytescale/upload-js/actions/workflows/ci.yml">
<img src="https://img.shields.io/npms-io/maintenance-score/upload-js?color=4ba0f6" />
</a>
<a target="_blank" href="https://twitter.com/intent/tweet?text=I%20just%20found%20Upload.js%20%26%20Upload.io%20%E2%80%94%20they%20make%20it%20super%20easy%20to%20upload%20files%20%E2%80%94%20installs%20with%207%20lines%20of%20code%20https%3A%2F%2Fgithub.com%2Fupload-io%2Fupload-js&hashtags=javascript,opensource,js,webdev,developers&via=UploadJS">
<a target="_blank" href="https://twitter.com/intent/tweet?text=I%20just%20found%20Upload.js%20%26%20Bytescale%20%E2%80%94%20they%20make%20it%20super%20easy%20to%20upload%20files%20%E2%80%94%20installs%20with%207%20lines%20of%20code%20https%3A%2F%2Fgithub.com%2Fupload-io%2Fupload-js&hashtags=javascript,opensource,js,webdev,developers&via=UploadJS">
<img alt="Twitter URL" src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fupload-io%2Fupload-js%2F" />

@@ -48,9 +48,9 @@ </a>

<p align="center"><a href="https://upload.io/upload-js"><img alt="Upload.js Demo" width="100%" src="https://raw.githubusercontent.com/upload-io/assets/master/upload-js-demo.gif"></a></p>
<p align="center"><a href="https://www.bytescale.com/upload-js"><img alt="Upload.js Demo" width="100%" src="https://raw.githubusercontent.com/bytescale/assets/master/upload-js-demo.gif"></a></p>
<p align="center">100% Serverless File Upload Library <br /> Powered by <a href="https://upload.io/">Upload.io</a><br/><br/></p>
<p align="center">100% Serverless File Upload Library <br /> Powered by <a href="https://www.bytescale.com/">Bytescale</a><br/><br/></p>
<hr/>
<p align="center"><a href="https://upload.io/dmca" rel="nofollow">DMCA Compliant</a> โ€ข <a href="https://upload.io/dpa" rel="nofollow">GDPR Compliant</a> โ€ข <a href="https://upload.io/sla" rel="nofollow">99.9% Uptime SLA</a>
<p align="center"><a href="https://www.bytescale.com/dmca" rel="nofollow">DMCA Compliant</a> โ€ข <a href="https://www.bytescale.com/dpa" rel="nofollow">GDPR Compliant</a> โ€ข <a href="https://www.bytescale.com/sla" rel="nofollow">99.9% Uptime SLA</a>
<br/>

@@ -82,3 +82,3 @@ <b>Supports:</b> Rate Limiting, Volume Limiting, File Size &amp; Type Limiting, JWT Auth, and more...

```html
<script src="https://js.upload.io/upload-js/v2"></script>
<script src="https://js.bytescale.com/upload-js/v2"></script>
```

@@ -97,3 +97,3 @@

const upload = Upload({ apiKey: "free" }); // Get production API keys from Upload.io
const upload = Upload({ apiKey: "free" }); // Get production API keys from Bytescale

@@ -119,6 +119,6 @@ const onFileSelected = async (event) => {

<head>
<script src="https://js.upload.io/upload-js/v2"></script>
<script src="https://js.bytescale.com/upload-js/v2"></script>
<script>
const upload = Upload({
// Get production API keys from Upload.io
// Get production API keys from Bytescale
apiKey: "free"

@@ -226,6 +226,6 @@ });

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://js.upload.io/upload-js/v2"></script>
<script src="https://js.bytescale.com/upload-js/v2"></script>
<script>
const upload = Upload({
// Get production API keys from Upload.io
// Get production API keys from Bytescale
apiKey: "free"

@@ -283,3 +283,3 @@ });

Upload.io provides an [Upload API](https://upload.io/docs/upload-api), which supports the following:
Bytescale provides an [Upload API](https://www.bytescale.com/docs/upload-api), which supports the following:

@@ -296,3 +296,3 @@ - File uploading.

-u apikey:free \
-X POST "https://api.upload.io/v1/files/basic"
-X POST "https://api.bytescale.com/v1/files/basic"
```

@@ -302,61 +302,20 @@

[Read the Upload API docs ยป](https://upload.io/docs/upload-api)
[Read the Upload API docs ยป](https://www.bytescale.com/docs/upload-api)
## ๐ŸŒ Image Processing API (Resize, Crop, etc.)
Upload.io also provides an [Image Processing API](https://upload.io/docs/image-processing-api), which supports the following:
Bytescale also provides an [Image Processing API](https://www.bytescale.com/docs/image-processing-api), which supports the following:
- [Image Resizing](https://upload.io/docs/image-processing-api#image-resizing-api)
- [Image Cropping](https://upload.io/docs/image-processing-api#image-cropping-api)
- [Image Compression](https://upload.io/docs/image-processing-api#image-compression-api)
- [Image Conversion](https://upload.io/docs/image-processing-api#f)
- [Image Manipulation (blur, sharpen, brightness, etc.)](https://upload.io/docs/image-processing-api#image-manipulation-api)
- [Layering (e.g for text & image watermarks)](https://upload.io/docs/image-processing-api#image)
- [Image Resizing](https://www.bytescale.com/docs/image-processing-api#image-resizing-api)
- [Image Cropping](https://www.bytescale.com/docs/image-processing-api#image-cropping-api)
- [Image Compression](https://www.bytescale.com/docs/image-processing-api#image-compression-api)
- [Image Conversion](https://www.bytescale.com/docs/image-processing-api#f)
- [Image Manipulation (blur, sharpen, brightness, etc.)](https://www.bytescale.com/docs/image-processing-api#image-manipulation-api)
- [Layering (e.g for text & image watermarks)](https://www.bytescale.com/docs/image-processing-api#image)
- and more...
[Read the Image Processing API docs ยป](https://upload.io/docs/image-processing-api)
[Read the Image Processing API docs ยป](https://www.bytescale.com/docs/image-processing-api)
### Original Image
### Manually Cropping Images โ€” [Try on CodePen](https://codepen.io/upload-js/pen/JjOaWpB?editors=1010)
Here's an example using [a photo of Chicago](https://upcdn.io/W142hJk/raw/example/city-landscape.jpg):
<img src="https://upcdn.io/W142hJk/raw/example/city-landscape.jpg" />
```
https://upcdn.io/W142hJk/raw/example/city-landscape.jpg
```
### Processed Image
Using the [Image Processing API](https://upload.io/docs/image-processing-api), you can produce [this image](https://upcdn.io/W142hJk/image/example/city-landscape.jpg?w=900&h=600&fit=crop&f=webp&q=80&blur=4&text=WATERMARK&layer-opacity=80&blend=overlay&layer-rotate=315&font-size=100&padding=10&font-weight=900&color=ffffff&repeat=true&text=Chicago&gravity=bottom&padding-x=50&padding-bottom=20&font=/example/fonts/Lobster.ttf&color=ffe400):
<img src="https://upcdn.io/W142hJk/image/example/city-landscape.jpg?w=900&h=600&fit=crop&f=webp&q=80&blur=4&text=WATERMARK&layer-opacity=80&blend=overlay&layer-rotate=315&font-size=100&padding=10&font-weight=900&color=ffffff&repeat=true&text=Chicago&gravity=bottom&padding-x=50&padding-bottom=20&font=/example/fonts/Lobster.ttf&color=ffe400" />
```
https://upcdn.io/W142hJk/image/example/city-landscape.jpg
?w=900
&h=600
&fit=crop
&f=webp
&q=80
&blur=4
&text=WATERMARK
&layer-opacity=80
&blend=overlay
&layer-rotate=315
&font-size=100
&padding=10
&font-weight=900
&color=ffffff
&repeat=true
&text=Chicago
&gravity=bottom
&padding-x=50
&padding-bottom=20
&font=/example/fonts/Lobster.ttf
&color=ffe400
```
## Manually Cropping Images โ€” [Try on CodePen](https://codepen.io/upload-js/pen/JjOaWpB?editors=1010)
To embed crop dimensions into an image:

@@ -367,6 +326,6 @@

<head>
<script src="https://js.upload.io/upload-js/v2"></script>
<script src="https://js.bytescale.com/upload-js/v2"></script>
<script>
const upload = Upload({
// Get production API keys from Upload.io
// Get production API keys from Bytescale
apiKey: "free"

@@ -380,3 +339,3 @@ });

const crop = {
// Type Def: https://github.com/upload-io/upload-image-plugin/blob/main/src/types/ParamsFromFile.ts
// Type Def: https://github.com/bytescale/upload-image-plugin/blob/main/src/types/ParamsFromFile.ts
inputPath: originalImage.filePath,

@@ -430,23 +389,23 @@ pipeline: {

[Upload.js Full Documentation ยป](https://upload.io/docs/upload-js)
[Upload.js Full Documentation ยป](https://www.bytescale.com/docs/upload-js)
## Need a File Upload Widget?
See our **[File Upload Widget](https://upload.io/uploader)**. (Built with Upload.js. Supports: image cropping, cancellation, progress, etc).
See our **[File Upload Widget](https://www.bytescale.com/docs/upload-widget)**. (Built with Upload.js. Supports: image cropping, cancellation, progress, etc).
<p align="center"><a href="https://upload.io/uploader"><img alt="Upload.js Demo" width="100%" src="https://raw.githubusercontent.com/upload-io/jquery-uploader/main/.github/assets/demo.webp"></a></p>
<p align="center"><a href="https://www.bytescale.com/docs/upload-widget"><img alt="Upload.js Demo" width="100%" src="https://raw.githubusercontent.com/bytescale/jquery-uploader/main/.github/assets/demo.webp"></a></p>
## ๐Ÿ‘‹ Create your Upload.io Account
## ๐Ÿ‘‹ Create your Bytescale Account
Upload.js is the lightweight JavaScript client library for Upload.io โ€” The File Upload Service for Web Apps:
Upload.js is the JS client library for Bytescale: the best way to serve images, videos, and audio for web apps.
**[Create an Upload.io account ยป](https://upload.io/upload-js/get-started)**
**[Create a Bytescale account ยป](https://www.bytescale.com/)**
## Can I use my own storage?
**Yes:** Upload.io supports AWS S3 on [Upload Plus](https://upload.io/pricing) plans.
**Yes:** Bytescale supports AWS S3, Cloudflare R2, Google Storage, and DigitalOcean Spaces.
Upload.io offers its own built-in storage for ease and simplicity (default).
To configure a custom storage backend, please see:
You can change this to AWS S3 on a folder-by-folder basis in the Upload Dashboard.
[https://www.bytescale.com/docs/storage/sources](https://www.bytescale.com/docs/storage/sources)

@@ -453,0 +412,0 @@ ## Building From Source

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