Socket
Socket
Sign inDemoInstall

mat-firebase-upload

Package Overview
Dependencies
2
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mat-firebase-upload

An easy-to-use Upload mat-form-field for Angular and Firebase


Version published
Weekly downloads
14
increased by75%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

mat-firebase-upload

NPM Version License Downloads/week Github Issues

An easy to use upload dropzone.

demo
  • Angular 2+
  • Material themed
  • Firebase storage

Basic Example

Component HTML

<form-firebase-file 
  [formControl]="controlFile" 
  [config]="config"
>
</form-firebase-file>

Component Typescript

...
  controlFile = new FormControl();
  config = {
    directory: `path/to/upload/to`,
    firebaseConfig: environment.firebaseConfig,
  };
...

angular.json

"my-project": {
  ...,
  "architect": {
    "build": {
      ...,
      "options": {
        ...,
        "assets": [
          ...,
          {
            "glob": "**/*",
            "input": "node_modules/mat-firebase-upload/assets",
            "output": "./assets/fileicons"
          }

Advanced Options

Component HTML

<form-firebase-file 
  [formControl]="controlFile" 
  [config]="config"
  placeholder="Drop files here!"
>
</form-firebase-file>

Component Typescript

...
  controlFile = new FormControl();
  config: FormFirebaseFilesConfiguration = {
    directory: `audits/somelocation`,
    firebaseConfig: environment.firebaseConfig,

    bucketname: 'my-other-bucket-name.appspot.com',
    firebaseApp: app,
    imageCompressionQuality: 0.8,
    imageCompressionMaxSize: 2000,
    acceptedFiles: 'image/*',
    useUuidName: true,
    deleteOnStorage: true
  };
...

More details in the Type definitions!

FAQs

Last updated on 22 Apr 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc