Let me rephrase my question, I have a problem, with deleting uploaded files, so I've made some modification to my code as suggested but It still does not work, further more there is a problem of overwriting my uploaded files, so every time I upload something it will just overwrite previous file, and I want to be able to upload many and delete them, thanks
<form class="htmlForm">
<label for="id_payment_proof">{% trans "Payment proof:" %}</label>
<div class="full-size">
<div class="input-control full-size file" data-role="input">
<input id="id_payment_proof" type="file" file-model="payment_proof"/>
<button class="button"><span class="mif-folder"></span></button>
</div>
</div>
<div ng-if="client_invoice.payment_proof_filename">
<a ng-href="{{ client_invoice.payment_proof }}"
ng-bind="client_invoice.payment_proof_filename"
target="_blank"></a>
<button class="button" ng_click="clearInvoice()">
<span class="mif-bin"></span>
</button>
</div>
{% endverbatim %}
</form>
controler:
editInvoiceHandler = (event, row) ->
$scope.payment_proof = undefined
$scope.htmlFormEl.reset()
$scope.row = row
$scope.client_invoice = row.data()
hasChanges = false
$scope.editMode = true
$scope.$digest()
$scope.clearInvoice() = () ->
$scope.payment_proof = 0