Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nishantmc/angular-material-fileupload

A fileupload component based on angular-material design
https://github.com/nishantmc/angular-material-fileupload

angular-material angular5 angular6 fileupload javascript

Last synced: 3 months ago
JSON representation

A fileupload component based on angular-material design

Awesome Lists containing this project

README

        

# angular-material-fileupload [![npm version](https://badge.fury.io/js/angular-material-fileupload.svg)](https://badge.fury.io/js/angular-material-fileupload)

A fileupload component based on angular-material design

# Documentation

[angular-material-fileupload API doc](https://nishantmc.github.io/angular-material-fileupload.github.io/)

# Demo

# Setup

The module to be imported is "MatFileUploadModule"

```Typescript

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { MatButtonModule } from '@angular/material';

import { AppComponent } from './app.component';
import { MatFileUploadModule } from 'angular-material-fileupload';

@NgModule({
imports: [
MatButtonModule,
BrowserModule,
MatFileUploadModule
],
declarations: [
AppComponent
],
bootstrap: [ AppComponent ]
})
export class AppModule { }

```

# File upload Example

![Screenshot](SingleFileDemo.gif)

```HTML
Upload file


```

**Notes**

- 'fileUploadQueue' is the template input variable which point to the queue. You can see its created in the queue tag (#fileUploadQueue). Basically pointing the input to the queue
- fileAlias and httpUrl are input variables which you can bind. 'fileAlias' - as you might guess just the alias of the file. and 'httpUrl' is the url you want to do POST with multipart data.

# Drag and drop example

![Screenshot](DragAndDropDemo.gif)

```HTML


Just drag and drop files here




```

# Example setting the inputs on mat-file-upload-queue

```HTML


Just drag and drop files here





```

# Example setting the inputs overridden on mat-file-upload

```HTML


Just drag and drop files here





```