The FileItem object set the alias to "file", and there is no easy way to change this. This makes it impossible to have a general backend that can determine action of the uploaded file based on the "name=file" form data.
I currently have to file drop's on my view, each with a distinct role. But, both are uploaded with a name of "file", so I don't know which is which.
Suggest adding an actual "name" input to the ng2-file-drop that can override the "alias" field for that item.
The FileItem object set the alias to "file", and there is no easy way to change this. This makes it impossible to have a general backend that can determine action of the uploaded file based on the "name=file" form data.
I currently have to file drop's on my view, each with a distinct role. But, both are uploaded with a name of "file", so I don't know which is which.
Suggest adding an actual "name" input to the ng2-file-drop that can override the "alias" field for that item.
actually what I did to get by this was change (click)="item.upload()"
to (click)="item.alias = newname; item.upload()" just pass newname through your component class
actually what I did to get by this was change
`(click)="item.upload()"`
to
`(click)="item.alias = newname; item.upload()"` just pass newname through your component class
Thx @adeteejay. I ended up just using a custom tokenized upload URL, instead of worrying about the field name. It worked cleaner for my situation, but I like the simplicity of your solution.
Thx @adeteejay. I ended up just using a custom tokenized upload URL, instead of worrying about the field name. It worked cleaner for my situation, but I like the simplicity of your solution.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The FileItem object set the alias to "file", and there is no easy way to change this. This makes it impossible to have a general backend that can determine action of the uploaded file based on the "name=file" form data.
I currently have to file drop's on my view, each with a distinct role. But, both are uploaded with a name of "file", so I don't know which is which.
Suggest adding an actual "name" input to the ng2-file-drop that can override the "alias" field for that item.
actually what I did to get by this was change
(click)="item.upload()"to
(click)="item.alias = newname; item.upload()"just pass newname through your component classThx @adeteejay. I ended up just using a custom tokenized upload URL, instead of worrying about the field name. It worked cleaner for my situation, but I like the simplicity of your solution.
I made PR to fix this problem, I hope guys will merge it :)
I also have this problem.