<div ng-controller="cadastroController">
    <div class="modal-header">
        <h3>Imagem</h3>
    </div>
    <div class="modal-body">
        <input type="hidden" ng-model="mySelFile">
        <input id="btUpload" type="file" ng-file-select="onFileSelect($files,selected.item)"
               accept="image/bmp,image/jpg,image/png,image/gif" 
               style="display:none">
        <!--<div ng-file-drop="" ng-file-select="onFileSelect($files,selected.item)" ng-model="mySelFile"
             class="drop-box"
             drag-over-class="{accept:'dragover', reject:'dragover-err', delay:100}"
             ng-multiple="true" allow-dir="true" accept="image/*"
             ng-show="dropSupported"
             style="width:300px; height:40px; padding:10px; border:1px solid #DDD; font-size:9pt; text-align:center">
            <b>Arraste a Imagem para esta caixa</b>
        </div>-->
        <div ng-file-drop="" ng-file-select="onFileSelect($files,selected.item)" ng-file-drag-over-class="optional-css-class" class="dropbox"
             ng-show="dropSupported">Arraste a Imagem para Aqui</div>
        
        
        <!--<div ng-file-drop="onFileSelect($files,selected.item)" ng-file-drag-over-class="optional-css-class" class="dropbox"
             ng-show="dropSupported">Arraste a Imagem para Aqui</div>-->
        <div ng-file-drop-available="dropSupported=true"
             ng-show="!dropSupported">HTML5 Drop File is not supported!</div>
        
        <br/>
        <div ng-show="uploadprogress>=0 && uploadprogress<100">
            
            <progressbar class="progress-striped active" max="100" value=uploadprogress><i>{{uploadprogress}}</i></progressbar>
            <p align="right"><button class="btn btn-primary btn-xs" ng-click="upload.abort()">Cancelar</button></p>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary"
                ng-disabled="selected.item.perm.PEditar==false || selected.item.perm.PCriar==false" 
                onclick="document.getElementById('btUpload').click()">Upload</button>
        <button class="btn btn-warning" ng-click="ok()">Fechar</button>
    </div>
</div>
