
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
ngx-uploadx
Advanced tools
Angular Resumable Upload Module
npm install ngx-uploadx
//...
import { UploadxModule } from 'ngx-uploadx';
@NgModule({
imports: [
UploadxModule,
// ...
});
// Component code
//...
import { Observable } from 'rxjs';
import { UploadxOptions, UploadState } from 'ngx-uploadx';
@Component({
selector: 'app-home',
templateUrl: `
<input type="file" [uploadx]="options" (uploadxState)="onUpload($event)">
`
})
export class AppHomeComponent {
options: UploadxOptions = { url: `[URL]`};
onUpload(state: Observable<UploadState>) {
state
.subscribe((item: UploadState) => {
console.log(item);
//...
}
}
Please navigate to the src/app sub-folder for more detailed examples
allowedTypes
: Allowed file types (directive only)
autoUpload
: Auto start upload when files added. Default value: true
chunkSize
: Set a fixed chunk size. If not specified, the optimal size will be automatically adjusted based on the network speed.
concurrency
: Set the maximum parallel uploads. Default value: 2
headers
: Headers to be appended to each HTTP request
metadata
: Custom uploads metadata
uploaderClass
: provide a user-defined class to support another upload protocol or to extend an existing one. Examples : internal and uploader-examples
token
: Authorization token as a string
or function returning a string
or Promise<string>
endpoint
: URL to create new uploads. Default value: '/upload'
<input
type="file"
[uploadx]="options"
[uploadxAction]="control"
(uploadxState)="onUpload($event)"
/>
uploadx
[uploadx]: UploadxOptions
Set options
[uploadxAction]: UploadxControlEvent
Control the uploads status
(uploadxState): ($event: <Observable>UploadState)=> void
init(options?: UploadxOptions): Observable<UploadState>
Initializes service. Returns Observable that emits a new value on progress or status changes
// @example:
uploadxOptions: UploadxOptions = {
concurrency: 4,
endpoint: `${environment.api}/upload`,
token: () => localStorage.getItem('access_token'),
};
ngOnInit() {
this.uploadService.init(this.uploadxOptions)
.subscribe((item: UploadState) => {
console.log(item);
//...
}
}
connect(options?: UploadxOptions): Observable<Uploader[]>
Initializes service. Returns Observable that emits the current queue
// @example:
@Component({
template: `
<input type="file" uploadx">
<div *ngFor="let item of uploads$ | async">{{item.name}}</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class UploadsComponent {
uploads$: Observable<Uploader[]>;
options: UploadxOptions = {
endpoint: `${environment.api}/upload?uploadType=uploadx`,
token: () => localStorage.getItem('access_token'),
}
constructor(private uploadService: UploadxService) {
this.uploads$ = this.uploadService.connect(this.options);
}
disconnect(): void
Terminate all uploads and clears the queue
handleFile(file: File): void
Create Uploader for the file and add to the queue
handleFileList(fileList: FileList): void
Add files to the upload queue
control(event: UploadxControlEvent): void
Control the uploads status
// @example:
pause(uploadId: string) {
this.uploadService.control({ action: 'pause', uploadId });
}
queue: Uploader[]
Uploaders array
events: Observable<UploadState>
Unloads status events
npm run server
npm start
http://localhost:4200/
Run npm run build
to build the lib.
packaged by ng-packagr
Pull requests are welcome!
The MIT License (see the LICENSE file for the full text)
FAQs
Angular Resumable Upload Module
The npm package ngx-uploadx receives a total of 2,674 weekly downloads. As such, ngx-uploadx popularity was classified as popular.
We found that ngx-uploadx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.