upload file into request folder and get their thumbnails

This commit is contained in:
Čarodej
2022-02-19 12:32:19 +01:00
parent 5be55b52bd
commit 1107bf66af
25 changed files with 349 additions and 60 deletions

View File

@@ -8,7 +8,23 @@ const defaultState = {
uploadRequest: undefined,
}
const actions = {}
const actions = {
getUploadRequestDetail: ({ commit, getters }) => {
axios.get(`/api/upload-request/${router.currentRoute.params.token}`)
.then((response) => {
commit('LOADING_STATE', { loading: false, data: [] })
commit('SET_UPLOAD_REQUEST', response.data)
// Set current folder if exist
if (response.data.data.relationships.folder) {
commit('SET_CURRENT_FOLDER', response.data.data.relationships.folder)
}
})
},
}
const mutations = {
SET_UPLOAD_REQUEST(state, payload) {