alfresco-ng2-components/docs/upload-drag-area.component.md
Eugenio Romano dd7a6565e3 [ADF-1711] The <adf-task-attachment-list component displays drag-and-… (#2716)
* [ADF-1711] The <adf-task-attachment-list component displays drag-and-drop area that is not working

* fix test for remove upload deprecated properties

* remove duplicate identifier
2017-11-23 17:15:01 +00:00

51 lines
1.2 KiB
Markdown

# Upload Drag Area Component
Adds a drag and drop area to upload files to Alfresco.
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
<!-- toc -->
- [Basic Usage](#basic-usage)
* [Properties](#properties)
* [Events](#events)
<!-- tocstop -->
<!-- markdown-toc end -->
## Basic Usage
```html
<adf-upload-drag-area (success)="onSuccess($event)">
<div style="width: 200px; height: 100px; border: 1px solid #888888">
DRAG HERE
</div>
</adf-upload-drag-area>
<file-uploading-dialog></file-uploading-dialog>
```
```ts
export class AppComponent {
public onSuccess(event: Object): void {
console.log('File uploaded');
}
}
```
### Properties
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| disabled | boolean | false | Toggle component disabled state |
| rootFolderId | string | '-root-' | The ID of the root folder node. |
| versioning | boolean | false | Versioning false is the default uploader behaviour and it renames the file using an integer suffix if there is a name clash. Versioning true to indicate that a major version should be created |
### Events
| Name | Description |
| --- | --- |
| success | Raised when the file is uploaded |