mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
improved uploading of files (#1730)
* improved uploading of files - new core/UploadDirective to allow dropping files to any html element - enhanced file dropping for DataTable rows (disabled by default) - enhanced file dropping for DocumentList rows (disabled by default) - upload drop area now handles file uploads for child elements (i.e. rows in the document list) * fix unit tests * unit tests and code cleanup * #1732, fix upload of folders
This commit is contained in:
committed by
Mario Romano
parent
f3de023ab3
commit
3fee3b5002
@@ -162,17 +162,14 @@ export class UploadService {
|
||||
* Create a folder
|
||||
* @param name - the folder name
|
||||
*/
|
||||
createFolder(relativePath: string, name: string) {
|
||||
return Observable.fromPromise(this.callApiCreateFolder(relativePath, name))
|
||||
.map(res => {
|
||||
return res;
|
||||
})
|
||||
createFolder(relativePath: string, name: string, parentId?: string) {
|
||||
return Observable.fromPromise(this.callApiCreateFolder(relativePath, name, parentId))
|
||||
.do(data => this.logService.info('Node data', data)) // eyeball results in the console
|
||||
.catch(err => this.handleError(err));
|
||||
}
|
||||
|
||||
callApiCreateFolder(relativePath: string, name: string): Promise<MinimalNodeEntity> {
|
||||
return this.apiService.getInstance().nodes.createFolder(name, relativePath);
|
||||
callApiCreateFolder(relativePath: string, name: string, parentId?: string): Promise<MinimalNodeEntity> {
|
||||
return this.apiService.getInstance().nodes.createFolder(name, relativePath, parentId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user