Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
ngx-file-drag-drop
Advanced tools
angular material file input component supports file drag and drop, and selection with native file picker
npm i ngx-file-drag-drop
selector: <ngx-file-drag-drop>
implements: ControlValueAccessor to work with angular forms
Additionnal properties
Name | Description |
---|---|
@Input() multiple: boolean | Allows multiple file inputs, false by default |
@Input() accept: string | Any value the native accept attribute can get. Doesn't validate input. |
@Input() disabled: boolean | Disable the input. |
@Input() emptyPlaceholder : string | Placeholder for empty input, default Drop file or click to select |
@Input() displayFileSize : boolean | Show file size in chip rather than in tooltip, default false |
@Input() activeBorderColor: string | A css color for when file is dragged into drop area, default purple |
@Output() valueChanged:EventEmitter<File[]> | Event emitted when input value changes |
addFiles():(files: File[] | FileList | File) => void | Update input |
removeFile():(file:File) => void | Removes the file from the input |
clear(): () => void | Removes all files from the input |
files: File[] | Getter for form value |
isEmpty: boolean | Whether the input is empty (no files) or not |
Usage:
<span>{{ 104857600 | byteFormat }}</span>
Output: 100 MB
import { FileValidators } from "ngx-file-drag-drop";
Validator | Description |
---|---|
uniqueFileNames | Disallow two files with same file name |
fileExtension(ext: string[]) | Required file extensions |
fileType(types: string[] | RegExp) | Required Mime Types |
maxFileCount(count: number) | Max number of files |
maxFileSize(bytes: number) | Max bytes allowed per file |
maxTotalSize(bytes: number) | Max total input size |
required | At least one file required |
FAQs
angular material file input component supports file drag and drop, and selection with native file picker
The npm package ngx-file-drag-drop receives a total of 1,225 weekly downloads. As such, ngx-file-drag-drop popularity was classified as popular.
We found that ngx-file-drag-drop demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.