mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-28 07:14:42 +00:00
file request url removed from http response
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<!--Form to set upload request-->
|
<!--Form to set upload request-->
|
||||||
<ValidationObserver
|
<ValidationObserver
|
||||||
v-if="!generatedUploadRequest"
|
v-if="!uploadRequest"
|
||||||
@submit.prevent="createUploadRequest"
|
@submit.prevent="createUploadRequest"
|
||||||
ref="createForm"
|
ref="createForm"
|
||||||
v-slot="{ invalid }"
|
v-slot="{ invalid }"
|
||||||
@@ -82,13 +82,13 @@
|
|||||||
</ValidationObserver>
|
</ValidationObserver>
|
||||||
|
|
||||||
<!--Copy generated link-->
|
<!--Copy generated link-->
|
||||||
<AppInputText v-if="generatedUploadRequest" :title="$t('copy_upload_request_link')" :is-last="true">
|
<AppInputText v-if="uploadRequest" :title="$t('copy_upload_request_link')" :is-last="true">
|
||||||
<CopyInput :str="generatedUploadRequest.data.attributes.url" />
|
<CopyInput :str="uploadRequestURL" />
|
||||||
</AppInputText>
|
</AppInputText>
|
||||||
</PopupContent>
|
</PopupContent>
|
||||||
|
|
||||||
<!--Actions-->
|
<!--Actions-->
|
||||||
<PopupActions v-if="!generatedUploadRequest">
|
<PopupActions v-if="!uploadRequest">
|
||||||
<ButtonBase class="w-full" @click.native="$closePopup()" button-style="secondary"
|
<ButtonBase class="w-full" @click.native="$closePopup()" button-style="secondary"
|
||||||
>{{ $t('cancel') }}
|
>{{ $t('cancel') }}
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
</PopupActions>
|
</PopupActions>
|
||||||
|
|
||||||
<!--Actions-->
|
<!--Actions-->
|
||||||
<PopupActions v-if="generatedUploadRequest">
|
<PopupActions v-if="uploadRequest">
|
||||||
<ButtonBase class="w-full" @click.native="$closePopup()" button-style="theme"
|
<ButtonBase class="w-full" @click.native="$closePopup()" button-style="theme"
|
||||||
>{{ $t('awesome_iam_done') }}
|
>{{ $t('awesome_iam_done') }}
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
@@ -147,7 +147,8 @@ export default {
|
|||||||
folder_id: undefined,
|
folder_id: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
},
|
},
|
||||||
generatedUploadRequest: undefined,
|
uploadRequest: undefined,
|
||||||
|
uploadRequestURL: undefined,
|
||||||
shareViaEmail: false,
|
shareViaEmail: false,
|
||||||
pickedItem: undefined,
|
pickedItem: undefined,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
@@ -166,7 +167,10 @@ export default {
|
|||||||
axios
|
axios
|
||||||
.post(`/api/file-request`, this.form)
|
.post(`/api/file-request`, this.form)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.generatedUploadRequest = response.data
|
this.uploadRequest = response.data
|
||||||
|
|
||||||
|
// Format upload request url
|
||||||
|
this.uploadRequestURL = `${this.$store.getters.config.host}/request/${response.data.data.id}/upload`
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
events.$emit('alert:open', {
|
events.$emit('alert:open', {
|
||||||
@@ -192,7 +196,7 @@ export default {
|
|||||||
|
|
||||||
// Restore data
|
// Restore data
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.generatedUploadRequest = undefined
|
this.uploadRequest = undefined
|
||||||
this.pickedItem = undefined
|
this.pickedItem = undefined
|
||||||
|
|
||||||
this.shareViaEmail = false
|
this.shareViaEmail = false
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ class UploadRequestResource extends JsonResource
|
|||||||
'status' => $this->status,
|
'status' => $this->status,
|
||||||
'email' => $this->email,
|
'email' => $this->email,
|
||||||
'notes' => $this->notes,
|
'notes' => $this->notes,
|
||||||
'url' => url("/request/$this->id/upload"),
|
|
||||||
],
|
],
|
||||||
'relationships' => [
|
'relationships' => [
|
||||||
$this->mergeWhen($this->folder, fn () => [
|
$this->mergeWhen($this->folder, fn () => [
|
||||||
|
|||||||
Reference in New Issue
Block a user