@enso-ui/uploader 2.0.8 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/uploader",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "File Uploader",
5
5
  "main": "bulma/index.js",
6
6
  "scripts": {
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <uploader v-bind="$attrs"
3
- :i18n="i18n"
3
+ :http="http"
4
+ :i18n="i18n"
4
5
  ref="uploader"/>
5
6
  </template>
6
7
 
@@ -12,7 +13,7 @@ export default {
12
13
 
13
14
  components: { Uploader },
14
15
 
15
- inject: ['i18n'],
16
+ inject: ['http', 'i18n'],
16
17
 
17
18
  methods: {
18
19
  browseFiles() {
@@ -19,6 +19,10 @@ export default {
19
19
  default: 20 * 1024 * 1024,
20
20
  type: Number,
21
21
  },
22
+ http: {
23
+ required: true,
24
+ type: Function,
25
+ },
22
26
  i18n: {
23
27
  default: (v) => v,
24
28
  type: Function,
@@ -98,7 +102,7 @@ export default {
98
102
  return;
99
103
  }
100
104
 
101
- axios.post(this.url, this.formData).then((response) => {
105
+ this.http.post(this.url, this.formData).then((response) => {
102
106
  this.reset();
103
107
  this.$emit('upload-successful', response.data);
104
108
  }).catch((error) => {