
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
ngx-quill-upload-ivy
Advanced tools
A module for images and videos to be uploaded to a server instead of being base64 encoded, in ngx-quill from toolbar editor.
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-quillimport Quill from 'quill';
import { VideoHandler, ImageHandler, Options } from 'ngx-quill-upload';
Quill.register('modules/imageHandler', ImageHandler);
Quill.register('modules/videoHandler', VideoHandler);
modules = {
toolbar: [
....
....
['image', 'video']
],
imageHandler: {
upload: (file) => {
return // your uploaded image URL as Promise<string>
},
accepts: ['png', 'jpg', 'jpeg', 'jfif'] // Extensions to allow for images (Optional) | Default - ['jpg', 'jpeg', 'png']
} as Options,
videoHandler: {
upload: (file) => {
return // your uploaded video URL as Promise<string>
},
accepts: ['mpeg', 'avi'] // Extensions to allow for videos (Optional) | Default - ['mp4', 'webm']
} as Options
};
<quill-editor [modules]="modules"></quill-editor>
upload: (file) => {
return new Promise((resolve, reject) => {
if (file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg') { // File types supported for image
if (file.size < 1000000) { // Customize file size as per requirement
// Sample API Call
const uploadData = new FormData();
uploadData.append('file', file, file.name);
return this.http.post('YOUR API URL', uploadData).toPromise()
.then(result => {
resolve(result.message.url); // RETURN IMAGE URL from response
})
.catch(error => {
reject('Upload failed');
// Handle error control
console.error('Error:', error);
});
} else {
reject('Size too large');
// Handle Image size large logic
}
} else {
reject('Unsupported type');
// Handle Unsupported type logic
}
});
}
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
FAQs
A module for images and videos to be uploaded to a server instead of being base64 encoded, in ngx-quill from toolbar editor.
We found that ngx-quill-upload-ivy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.