Skip to content
Snippets Groups Projects
Commit aeb2e98e authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fetch blob instead of window.url to download file

parent 3ade3ac9
No related branches found
No related tags found
1 merge request!139REDMINE_ISSUE-12407
This commit is part of merge request !139. Comments created here will be created in the context of that merge request.
......@@ -340,15 +340,15 @@ export default {
exportFeatures() {
const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/${this.$route.params.slug}/feature-type/${this.$route.params.feature_type_slug}/export/`;
featureAPI
.getFeaturesBlob(url)
.then((blob) => {
featureAPI.getFeaturesBlob(url).then((blob) => {
if (blob) {
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = `${this.project.title}-${this.structure.title}.json`;
link.click();
URL.revokeObjectURL(link.href);
})
}
});
},
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment