Does anyone know a way to dynamically change the file name in AngularJS?
<input type="file" onchange="angular.element(this).scope().filename(this)">
In the filename method, I am attempting to change the file name but the value is not updating. How can I successfully change the file name in a file upload?
$scope.filename= function(e)
{
for (var i = 0; i < e.files.length; i++) {
var x = e.files[i].name + "test";
e.files[i].name = x;
/// I am altering the file name here, but it seems to be a read-only property. How can I change the name?
}
}
I need to change the upload file name for each uploaded file. How can I assign a file name to every file that is uploaded?