Connect blob page to Vue Router and use it to generate axios request url
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
When uploading a blob modal, the request path is generated from Vue router.
const {
$route: {
params: { path },
},
} = this;
const uploadPath = joinPaths(this.path, path);
return this.submitRequest('post', uploadPath);
In this MR > !62880 (merged), we added support for "replacing a blob". The request path is based on the prop replacePath
that is coming from HAML's data attribute. Let's instead make it consistent with the behaviour of "uploading" and switch it to use Vue router.
- Connect Vue router to blob show page >
app/assets/javascripts/pages/projects/blob/show/index.js
- Remove `replacePath
- Create the axio request url from the path information of Vue router.
Edited by 🤖 GitLab Bot 🤖