alfresco-ng2-components/docs/content-services/upload-drag-area.component.md
camorra-skk 7358563b09 [ADF-711] Drag and drop doesn't have the acceptedFilesType property (#3104)
* Added acceptedFilesType property for upload-drag-area component.
* Only those files will be uploaded which are included in acceptedFilesType.
2018-03-22 09:35:40 +00:00

1.2 KiB

Added, Status
Added Status
v2.0.0 Active

Upload Drag Area Component

Adds a drag and drop area to upload files to Alfresco.

Basic Usage

<adf-upload-drag-area (success)="onSuccess($event)">
    <div style="width: 200px; height: 100px; border: 1px solid #888888">
        DRAG HERE
    </div>
</adf-upload-drag-area>
<adf-file-uploading-dialog></adf-file-uploading-dialog>
export class AppComponent {

    public onSuccess(event: Object): void {
        console.log('File uploaded');
    }

}

Properties

Name Type Default Description
disabled boolean false Toggle component disabled state
parentId string '-root-' The ID of the folder in which the files will be uploaded.
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
acceptedFilesType string '*' List of allowed file extensions, for example: ".jpg,.gif,.png,.svg".

Events

Name Description
success Raised when the file is uploaded
error Raised when the file upload goes in error