The problem is that ImageTool expects success at the top level, not inside data. Return this from uploadByFile:
return {
success: 1,
file: {
url: resp.data.data.file.url
}
};
This will let ImageTool read success and handle the uploaded file correctly.