【问题标题】:Multiple instances - NG file upload Danial Farid ver 10多个实例 - NG 文件上传 Danial Farid 版本 10
【发布时间】:2021-11-19 21:34:09
【问题描述】:

我查看了在第一个标签下发布的问题,但找不到与我正在尝试做的事情相匹配的任何内容。

有没有办法在同一个页面中创建多个上传器实例?

我有这个一直运行良好的块

<div
      class="btn btn-success btn-lg btn-outline offset-sm-2 col-sm-8" id="fileSelectButton" name="fileUpload"
      ng-show="canSelect && !isProcessing && fileReaderSupported && !partialFiles.length"
      ng-id="odsFileSelect" tabindex="0"
      ngf-accept="selectedUploadType.expected_file_type"
      ng-model="selectedFiles" ngf-keep="'distinct'"
      ngf-select="setBannerStatus('isProcessing'); onFileSelect(selectedFiles); "
      ngf-multiple="true"
>
                        Click to upload {{ selectedUploadType.display_name }} files
                    </div>

然后我在下面添加了这几行

<div
    class="btn btn-success btn-lg btn-outline offset-sm-2 col-sm-8" 
    id="partialSelectButton" name="partialUpload"
    ng-show="canSelect && !isProcessing && fileReaderSupported"
    ng-id="odsPartialSelect" tabindex="0"
    ngf-accept="selectedUploadType.expected_file_type"
    ng-model="partialFiles" ngf-keep="'distinct'"
    ngf-select="onPartialSelect(partialFiles); "
    ngf-multiple="true"
 >
                                                            Click to add or replace files
                                                        </div>

即使函数在第二个函数上触发,模型对象也是空的。它不显示选定的文件

非常感谢您的帮助,谢谢

【问题讨论】:

    标签: javascript angularjs file-upload ng-file-upload


    【解决方案1】:

    对这个帖子感到抱歉。我的代码无法正常工作,因为第二个代码在 if 渲染下,该渲染在一开始是错误的。我现在知道这个问题了,你

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-10
      • 1970-01-01
      • 2021-09-18
      • 1970-01-01
      • 2015-02-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多