User Data Export and import (#699)
Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/699 Co-authored-by: konrad <k@knt.li> Co-committed-by: konrad <k@knt.li>
This commit is contained in:
parent
44bb7358b6
commit
f4c552a79f
17 changed files with 347 additions and 54 deletions
|
|
@ -319,6 +319,17 @@ export default class AbstractService {
|
|||
})
|
||||
}
|
||||
|
||||
getBlobUrl(url, method = 'GET', data = {}) {
|
||||
return this.http({
|
||||
url: url,
|
||||
method: method,
|
||||
responseType: 'blob',
|
||||
data: data,
|
||||
}).then(response => {
|
||||
return window.URL.createObjectURL(new Blob([response.data]))
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a get request to the url specified before.
|
||||
* The difference between this and get() is this one is used to get a bunch of data (an array), not just a single object.
|
||||
|
|
@ -487,6 +498,8 @@ export default class AbstractService {
|
|||
* @returns {Q.Promise<unknown>}
|
||||
*/
|
||||
uploadFormData(url, formData) {
|
||||
console.log(formData, formData._boundary)
|
||||
|
||||
const cancel = this.setLoading()
|
||||
return this.http.put(
|
||||
url,
|
||||
|
|
|
|||
Reference in a new issue