使用https://github.com/valor-software/ng2-file-upload拖放文件附件。它允许文件夹被拖放并附加到 chrome 浏览器中。
我的 HTML 模板:
<div ng2FileDrop
[ngClass]="{'nv-file-over': hasBaseDropZoneOver}"
(fileOver)="fileOverBase($event)"
[uploader]="uploader"
class="well my-drop-zone">
<div class="attachment-scroller">
<div class="row">
<div class="col-md-9">
<table class="table upload-attachment">
<tbody>
<tr>
<input type="file" ng2FileSelect [uploader]="uploader" id="files" multiple />
<label for="files">+ Choose files to upload or drop them here</label>
</tr>
</tbody>
</table>
</div>
</div>
<div class="attachment-row" *ngIf="uploader.queue.length > 0">
<div class="col-md-9">
<div *ngFor="let item of uploader.queue">
<div class="attachment-label pull-left">
<span><strong>{{ item?.file?.name }}({{item?.file?.size | formatBytes}})</strong></span> <i
class="fa fa-times text-right attachment-delete-button"
(click)="item.remove()" aria-hidden="true"></i>
</div>
</div>
</div>
</div>
</div>
</div>
无论如何不允许文件夹类型使用 ng2-file-upload 在 chrome 中附加?
任何帮助都会很棒。