Change fileName before upload
Hi, at first time thx for great job :) But i have a question. Is there any way how to change fileName before update? Attribute name on object file i can't change because is read only. I found a solution when we can change file name when adding file to formdata. But its locked in your directive. Have you another solution pls ?
THX!
With the v.3.x.x, this is what I tried and still not working. The files are uploaded, but with the original name, and i'd like to add in ID. Any clue?
let myId = 'test';
this.files.forEach(function(file) {
file.name = file.name.replace(".", "_" + myId + ".");
});
console.log(this.files); //working, the fileName is changed
const event: UploadInput = {
type: 'uploadAll',
url: config.loopbackUrlApi + 'containerPhotos/images/upload/',
method: 'POST',
data: { access_token: accessToken },
concurrency: 0
};
this.uploadInput.emit(event);
Is it close because changes has been made into the project, or because the defect is too old? (I really need this functionality a year later)
Hi @F3L1X79 its to old, but I'm reopening the issue. I have closed all issues older than 2017. If there is a need for something like this, we will review the issues and hopefully will work on it in future release ;)
Thank you a lot for the good work and for maintaining this project.
#370