https://github.com/modulr/mdr-angular-file
File Upload Drag and Drop
https://github.com/modulr/mdr-angular-file
Last synced: 6 months ago
JSON representation
File Upload Drag and Drop
- Host: GitHub
- URL: https://github.com/modulr/mdr-angular-file
- Owner: modulr
- License: mit
- Created: 2015-10-12T23:09:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-10-01T14:59:49.000Z (over 7 years ago)
- Last Synced: 2025-08-12T06:43:59.958Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 26.4 KB
- Stars: 11
- Watchers: 5
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Angular File
Angular File is an Angularjs component that can upload files via XMLHttpRequest, provides drag & drop support.
- Backend and Frontend [examples](https://github.com/Modulr/mdr-angular-file/tree/master/examples)

##Features
- Uses the native Angularjs scope for data binding
- Drag & Drop
- Multiple or single files uploads
- Image preview
- Update progress
- Large files support
##Requirements
- [Angularjs](https://angularjs.org/)
- [Bootstrap 3.](http://getbootstrap.com/)
##Quick start
Several quick start options are available:
- [Download the latest release](https://github.com/Modulr/mdr-angular-file/archive/master.zip)
- Clone the repo: `git clone https://github.com/Modulr/mdr-angular-file.git`.
- Install with [Bower](http://bower.io/): `bower install mdr-angular-file`.
- Install with [npm](https://www.npmjs.com): `npm install mdr-angular-file`.
##What's included
```
mdr-angular-file/
dist/
├── mdr-file.css
├── mdr-file.min.css
├── mdr-file.js
└── mdr-file.min.js
```
##Documentation
####Usage
######Load CSS
```html
```
######Load JS
```html
```
######Code
```js
angular.module('MyApp', ['mdr.file'])
```
######HTML View or Templates
> Basic Directive
```html
```
> Complete Directive (All attributes)
```html
```
####API
######Attributes
Attribute | Type | Description
--- | --- | ---
url | `string` | *Is the path on the server where the file will be uploaded.* **Note:** *The parameter received on the server is* `file`
model | `object` | *It is the scope model where will be received to response the server.*
data | `object` | *Data to be sent to the server.*
headers | `object` | *Send headers to the server.*
size | `number` | *Max size in MB to file.*
limit | `number` | *Max number files to upload.*
formats | `string,array` | *Extensions permitted to the file.*
multiple | `boolean` | *If required to upload a multiple file is marked as true.*
disabled | `boolean` | *If required disable the component is marked as true.*
text | `string` | *Text into area drag and drop.*
##How to contribute
All contributions are very welcome, We love it. There are several ways to help out:
- Create an [issue](https://github.com/Modulr/mdr-angular-file/issues) on GitHub, if you have found a bug
- Write test cases for open bug issues
- Write patches for open bug/feature issues, preferably with test cases included
- Contribute to the documentation
There are a few guidelines that we need contributors to follow so that we have a chance of keeping on top of things.
If you want to making changes Better avoid working directly on the `master` branch, to avoid conflicts if you pull in updates from origin, so, if make your contribution under the branch [`dev`](https://github.com/Modulr/mdr-angular-file/tree/dev), into folder `src/`.
##Community
- Implementation help may be found at Stack Overflow (tagged [`mdr-file`](http://stackoverflow.com/questions/tagged/mdr-file)).
##Creators
[@AlfredoBarronC](https://twitter.com/AlfredoBarronC)
## Copyright and license
Code and documentation (c) Copyright 2015 Modulr. Code published under [license MIT](https://github.com/Modulr/mdr-angular-file/blob/master/LICENSE)