Skip to content

Latest commit

 

History

History

angular-uploader

Uploadcare logo

WebsiteQuick StartDocsBlogDiscordTwitter

Angular file uploading examples

Edit angular-uploader

This is an example project of implementing a file uploader in an Angular application with Uploadcare File Uploader.

Run this demo locally

# clone this repo and go to the cloned folder

$ cd examples/angular-uploader

$ npm install
# or `yarn install`, if you wish

$ npm run start
# or `yarn start`

Installation

All you need to do is to install @uploadcare/file-uploader from npm via your favorite Node package manager.

Read more about installation in the Uploadcare documentation.

Configuration

Please, read the File Uploader documentation.

Integration notes

Angular + Web Components

File Uploader is native to the Web but not to Angular. However, Angular does everything to make solutions based on Web Components to work properly with it.

To help Angular to figure out where you're using Web Components, you have to set schemas property of the file uploader component to [CUSTOM_ELEMENTS_SCHEMA], where CUSTOM_ELEMENTS_SCHEMA is a special schema imported from @angular/core. In this example we have done it inside every component. E.g. the file-uploader component.

You may like to read custom element schemas doc, if you want to know more about using custom elements in Angular.

Styling

If your styling solution may provide class string or style object, feel free to use them on components like uc-file-uploader-regular and override default class using CSS variables.

Otherwise you may go “full override” way and pass a string with styles to a File Uploader type of your choice.

Read more about styling in the File Uploader docs.

Contribution

You’re always welcome to contribute:

  • Create issues every time you feel something is missing or goes wrong.
  • Provide your feedback or drop us a support request at [email protected].
  • Ask questions on Stack Overflow with "uploadcare" tag if others can have these questions as well.
  • Star this repo if you like it ⭐️