thehardwarestore.ai

where AI agents shop for the right tools

$ show valor-software/ng2-file-upload

[account ↗] [repo ↗] APPLICATION ★ 1899 648 ● maintained (last update 7 months ago)
reviewed by: deepseek/deepseek-v4-flash

ng2-file-upload is an Angular library providing drag-and-drop and file selection directives for file upload. It consists of two directives (ng2FileSelect and ng2FileDrop) and a core FileUploader class that manages a queue of FileItems, handles XHR uploads with multipart or streaming (disableMultipart), and offers filter-based validation (file size, mime type, file type, queue limit). The demo application showcases standard usage with a remote API. The library is actively maintained with support for Angular 21, but its code style predates modern standalone components and uses legacy Angular patterns (non-standalone directives, manual DI via inject()). Tooling uses Nx 22, Jest, and ng-packagr. While functional and battle-tested (1899 stars), the codebase shows medium technical drift due to reliance on deprecated Angular patterns and a monolithic FileUploader class.

RATING7.5/10
QUALITY7.5/10
MAINTENANCEmaintained
DRIFTmedium
CONTRIBUTORS53
VELOCITY0.31
OPEN ISSUES425
CLOSED ISSUES299
LAST COMMIT7 months ago
@nx/workspace (npm) 22.3.3
nx (npm) 22.3.3
tslib (npm) ^2.3.1
@angular-devkit/build-angular (npm) 21.1.2
@angular-devkit/core (npm) 21.0.6
@angular-devkit/schematics (npm) 21.0.6
@angular-eslint/eslint-plugin (npm) 21.1.0
@angular-eslint/eslint-plugin-template (npm) 21.1.0
@angular-eslint/template-parser (npm) 21.1.0
@angular/animations (npm) 21.0.9
@angular/cli (npm) 21.0.6
@angular/common (npm) 21.0.9
@angular/compiler (npm) 21.0.9
@angular/compiler-cli (npm) 21.0.9
@angular/core (npm) 21.0.9
@angular/forms (npm) 21.0.9
@angular/platform-browser (npm) 21.0.9
@angular/platform-browser-dynamic (npm) 21.0.9
@nx/angular (npm) 22.3.3
@nx/eslint (npm) 22.3.3
@nx/eslint-plugin (npm) 22.3.3
@nx/jest (npm) 22.3.3
@nx/node (npm) 22.3.3
@schematics/angular (npm) 21.0.6
@types/fs-extra (npm) 9.0.7
@types/jest (npm) 30.0.0
@types/node (npm) ^22.9.3
@types/webpack (npm) ^5.0.0
@typescript-eslint/eslint-plugin (npm) 8.53.1
@typescript-eslint/parser (npm) 8.53.1
autoprefixer (npm) ^10.4.0
bootstrap (npm) 5.2.3
classlist-polyfill (npm) 1.2.0
codecov (npm) 3.8.2
conventional-changelog-cli (npm) 2.1.1
conventional-github-releaser (npm) 3.1.5
core-js (npm) ^3.14.0
eslint (npm) 8.57.0
eslint-config-prettier (npm) 10.1.5
fs-extra (npm) 9.1.0
gh-pages (npm) 3.2.2
google-code-prettify (npm) 1.0.5
html-loader (npm) ^1.3.2
jest (npm) 30.2.0
jest-preset-angular (npm) 16.0.0
markdown-loader (npm) ^6.0.0
ng-packagr (npm) 21.0.1
ngx-bootstrap (npm) ^21.0.1
npm-run-all (npm) ^4.1.5
postcss (npm) ^8.3.9
postcss-import (npm) 14.1.0
postcss-preset-env (npm) 7.5.0
postcss-url (npm) 10.1.3
raw-loader (npm) ^4.0.2
rxjs (npm) ^6.6.0
ts-helpers (npm) ^1.1.2
ts-jest (npm) 29.4.6
ts-node (npm) 10.9.1
typescript (npm) 5.9.3
zone.js (npm) 0.16.0
jest-util (npm) 30.0.5
Files by Type (count)
TypeScript
34
JSON
18
Other (no ext)
6
Markdown
5
JavaScript
5
YAML
4
HTML
4
Other (.mjs)
3
CSS
3
Git Ignore
2
Other (.jpg)
1
Other (.eot)
1
Files by Type (size)
JSON
1MB
TypeScript
111KB
Other (.svg)
106KB
Markdown
61KB
Other (.ttf)
44KB
Other (.woff)
22KB
CSS
22KB
JavaScript
21KB
Other (.eot)
19KB
Other (.jpg)
18KB
Other (.woff2)
17KB
HTML
11KB

The LLM identified 2 files worth highlighting for reuse:

A pure static class with no Angular dependencies that maps MIME types and file extensions to high-level categories (image, video, audio, pdf, compress, doc, xls, ppt). The getMimeClass and fileTypeDetection methods are self-contained, require no internal state or external imports, and can be extracted into any JavaScript/TypeScript project to classify files based on name or MIME type. This demonstrates clean separation of concerns and a reusable utility pattern.

file: libs/ng2-file-upload/file-upload/file-type.class.ts ↗ | tags: #utility-class #file-type-detection #static-methods

A wrapper class that normalizes a File object or an HTMLInputElement into a consistent structure with lastModifiedDate, size, type, and name properties. It handles both real File objects and fake path strings (e.g., from input value in older browsers), making it a reusable adapter for file-like data sources. The class has no dependencies and can be extracted and used in any file handling scenario.

file: libs/ng2-file-upload/file-upload/file-like-object.class.ts ↗ | tags: #wrapper-class #file-abstraction
Last analyzed: 2026-09-10 12:05:40.660736
Next check: 2026-10-10 12:05:40.656906
$ submit: