Answer the question
In order to leave comments, you need to log in
Reinitialization of parameters in UI Kit in Upload component?
Hello, I'm trying to change the boot options, but it doesn't work.
Apparently, the initialization of the params option occurs once, after the page is loaded. Because when you try to change the parameters, the result is not given.
In general, when sending a request, you also need to pass access_key and access_value , which I get using Application.getTKey() and Application.getTVal() . If their value has changed after the page is loaded, then the request does not pass, if the value has not changed, the first request passes and the next one does not pass. The Upload
component itself
Code settings
settings = {
single: true,
type:'json',
action: '/api/image/post',
allow: '*.(jpg|jpeg|gif|png)',
params: {
'access_key': Application.getTKey(),
'access_token': Application.getTVal()
},
complete: function(res){
if(res.message != 'Security error'){
Application.initAccess(res.token.key, res.token.value);
this.params ={// Даже так пробовал менять, не выходит
'access_key': Application.getTKey(),
'access_token': Application.getTVal()
};
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question