This is an automated email from the ASF dual-hosted git repository. machristie pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit c9d5d0440ef43f33ba938cf94dbc96089f4de86d Author: Marcus Christie <[email protected]> AuthorDate: Mon Jul 20 18:52:46 2020 -0400 Update xhrUploadEndpoint configuration whenever it changes --- django_airavata/static/common/js/components/Uppy.vue | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/django_airavata/static/common/js/components/Uppy.vue b/django_airavata/static/common/js/components/Uppy.vue index 44cf714..077e6d1 100644 --- a/django_airavata/static/common/js/components/Uppy.vue +++ b/django_airavata/static/common/js/components/Uppy.vue @@ -2,11 +2,9 @@ <div class="custom-Uppy"> <div ref="dragDrop" /> <div ref="statusBar" /> - <b-alert - class="mt-1" - :show="restrictionFailed" - variant="danger" - >{{ restrictionFailedMessage }}</b-alert> + <b-alert class="mt-1" :show="restrictionFailed" variant="danger">{{ + restrictionFailedMessage + }}</b-alert> </div> </template> @@ -137,6 +135,16 @@ export default { reset() { this.uppy.reset(); } + }, + watch: { + xhrUploadEndpoint(val) { + // Update the xhrUploadEndpoint configuration on XHRUpload whenever it changes + if (this.uppy && this.settings && !this.settings.tusEndpoint) { + this.uppy.getPlugin("XHRUpload").setOptions({ + endpoint: val + }); + } + } } }; </script>
