diff --git a/assets/css/styles.scss b/assets/css/styles.scss index 5e374d5bc..831a86e0e 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -760,6 +760,7 @@ div.tab { order: 1; } +input[type="file"], input[type="radio"], div.tab { display: none; diff --git a/pages/index.vue b/pages/index.vue index 5fc3e3500..11c0075c2 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -116,11 +116,21 @@
@@ -1903,6 +1913,25 @@ export default { this.contentType = ["POST", "PUT", "PATCH"].includes(this.method) ? "application/json" : ""; + }, + uploadPayload() { + this.rawInput = true; + let file = this.$refs.payload.files[0]; + if (file != null) { + let reader = new FileReader(); + reader.onload = (e) => { + this.rawParams = e.target.result; + }; + reader.readAsText(file); + this.$toast.info("File imported", { + icon: "attach_file" + }); + } + else { + this.$toast.error("Choose a file", { + icon: "attach_file" + }); + } } }, mounted() {