Gathering detailed insights and metrics for ngx-quill-upload
Gathering detailed insights and metrics for ngx-quill-upload
Gathering detailed insights and metrics for ngx-quill-upload
Gathering detailed insights and metrics for ngx-quill-upload
npm install ngx-quill-upload
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
18 Stars
30 Commits
10 Forks
3 Watching
5 Branches
2 Contributors
Updated on 31 Aug 2024
Minified
Minified + Gzipped
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
25.1%
514
Compared to previous day
Last week
22.4%
2,319
Compared to previous week
Last month
2.4%
8,000
Compared to previous month
Last year
-46.2%
75,183
Compared to previous year
1
A module for images and videos to be uploaded to a server instead of being base64 encoded, in ngx-quill from toolbar editor.
<img>
tag for image uploads, <video>
tag for video uploadsnpm install ngx-quill-upload
quill
and ngx-quill
for usage with ngx-quill1import Quill from 'quill'; 2import { VideoHandler, ImageHandler, Options } from 'ngx-quill-upload'; 3 4Quill.register('modules/imageHandler', ImageHandler); 5Quill.register('modules/videoHandler', VideoHandler); 6 7 8 modules = { 9 toolbar: [ 10 .... 11 .... 12 ['image', 'video'] 13 ], 14 imageHandler: { 15 upload: (file) => { 16 return // your uploaded image URL as Promise<string> 17 }, 18 accepts: ['png', 'jpg', 'jpeg', 'jfif'] // Extensions to allow for images (Optional) | Default - ['jpg', 'jpeg', 'png'] 19 } as Options, 20 videoHandler: { 21 upload: (file) => { 22 return // your uploaded video URL as Promise<string> 23 }, 24 accepts: ['mpeg', 'avi'] // Extensions to allow for videos (Optional) | Default - ['mp4', 'webm'] 25 } as Options 26 };
1 <quill-editor [modules]="modules"></quill-editor>
1 upload: (file) => { 2 return new Promise((resolve, reject) => { 3 4 if (file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg') { // File types supported for image 5 if (file.size < 1000000) { // Customize file size as per requirement 6 7 // Sample API Call 8 const uploadData = new FormData(); 9 uploadData.append('file', file, file.name); 10 11 return this.http.post('YOUR API URL', uploadData).toPromise() 12 .then(result => { 13 resolve(result.message.url); // RETURN IMAGE URL from response 14 }) 15 .catch(error => { 16 reject('Upload failed'); 17 // Handle error control 18 console.error('Error:', error); 19 }); 20 } else { 21 reject('Size too large'); 22 // Handle Image size large logic 23 } 24 } else { 25 reject('Unsupported type'); 26 // Handle Unsupported type logic 27 } 28 }); 29 }
ngx-quill-upload uses Quill.register
for overwriting an existing module for Image and Video handler, QuillJS logs a warning.
To supress those expected warnings you can turn them off by passing suppressGlobalRegisterWarning: true
in ngx-quill config.
Read more here
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 6/22 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More