Renaming file before uploading. #755

Open
opened 2017-04-24 16:54:18 +00:00 by vgogov · 1 comment
vgogov commented 2017-04-24 16:54:18 +00:00 (Migrated from github.com)

Hello,

I'm trying to modify the file name before sending the file to the back-end. Currently I can import the files into the uploader queue as input boxes, so I am able to edit the filename, but it doesn't take effect:

<tr *ngFor="let item of uploader.queue">
<td><input type="text" value = "{{ item?.file?.name }}">
</td>

How would I go about when I rename the `value = "{{ item?.file?.name }} to actually take effect and re-name the file?

Thanks!

Hello, I'm trying to modify the file name before sending the file to the back-end. Currently I can import the files into the uploader queue as input boxes, so I am able to edit the filename, but it doesn't take effect: ``` <tr *ngFor="let item of uploader.queue"> <td><input type="text" value = "{{ item?.file?.name }}"> </td> ``` How would I go about when I rename the `value = "{{ item?.file?.name }} to actually take effect and re-name the file? Thanks!
andypowney commented 2017-07-17 08:03:15 +00:00 (Migrated from github.com)

Appreciate this is quite old, but the solution I found was this:

<input type="text" [value]="item.file.name" (change)="item.file.name = $event.target.value">

Appreciate this is quite old, but the solution I found was this: `<input type="text" [value]="item.file.name" (change)="item.file.name = $event.target.value">`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#755