<el-upload class="upload" action="http://127.0.0.1:5000/upload/email" :file-list="fileList" >
Here i have used element UI library and I need to pass email value to the 'action' url to end like base_url/upload/${email}
. But this way doesn't work here in binding the value, because it takes the whole url as a string.
export default {
name: "**",
data() {
return {
base_url: "http://127.0.0.1:5000",
email: email,
fileList: []
}
}
What needs to be done here for binding data to the action so that it does post request with the help of el-upload having base_url and email data?
Changing action
to :action
worked for me :)
which will be like :-
<el-upload
class="upload"
:action="base_url+'/upload/'+email"
:file-list="fileList"
>