Fix file downloading permissions
This commit is contained in:
parent
8955b5a660
commit
ce911f827e
4 changed files with 4 additions and 5 deletions
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="action">Copy</div>
|
<div class="action">Copy</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="context-row" v-on:click="triggerAction('download')">
|
<div class="context-row" v-on:click="triggerAction('download')" v-if="!object.directory">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<Icon name="download" class="h-4"/>
|
<Icon name="download" class="h-4"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
ref="contextMenu"
|
ref="contextMenu"
|
||||||
/>
|
/>
|
||||||
<CopyFileModal :file="file" v-if="modals.copy" v-on:close="$emit('list')"/>
|
<CopyFileModal :file="file" v-if="modals.copy" v-on:close="$emit('list')"/>
|
||||||
<DownloadFileModal :file="file" v-if="modals.download" v-on:close="modals.download = false"/>
|
<DownloadFileModal :file="file" v-if="!file.directory && modals.download" v-on:close="modals.download = false"/>
|
||||||
<DeleteFileModal :visible.sync="modals.delete" :object="file" v-on:deleted="$emit('deleted')" v-on:close="modal.delete = false"/>
|
<DeleteFileModal :visible.sync="modals.delete" :object="file" v-on:deleted="$emit('deleted')" v-on:close="modal.delete = false"/>
|
||||||
<RenameModal :visible.sync="modals.rename" :object="file" v-on:renamed="$emit('list')" v-on:close="modal.rename = false"/>
|
<RenameModal :visible.sync="modals.rename" :object="file" v-on:renamed="$emit('list')" v-on:close="modal.rename = false"/>
|
||||||
<MoveFileModal :visible.sync="modals.move" :file="file" v-on:moved="$emit('list')" v-on:close="modal.move = false"/>
|
<MoveFileModal :visible.sync="modals.move" :file="file" v-on:moved="$emit('list')" v-on:close="modal.move = false"/>
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
components: { SpinnerModal },
|
components: { SpinnerModal },
|
||||||
|
|
||||||
computed: mapState('server', {
|
computed: mapState('server', {
|
||||||
server: (state: ServerState) => state.server,
|
|
||||||
credentials: (state: ServerState) => state.credentials,
|
credentials: (state: ServerState) => state.credentials,
|
||||||
fm: (state: ServerState) => state.fm,
|
fm: (state: ServerState) => state.fm,
|
||||||
}),
|
}),
|
||||||
|
@ -35,7 +34,7 @@
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
const path = join(this.fm.currentDirectory, this.file.name);
|
const path = join(this.fm.currentDirectory, this.file.name);
|
||||||
|
|
||||||
getDownloadToken(this.server.uuid, path)
|
getDownloadToken(this.$route.params.id, path)
|
||||||
.then((token) => {
|
.then((token) => {
|
||||||
if (token) {
|
if (token) {
|
||||||
window.location.href = `${this.credentials.node}/v1/server/file/download/${token}`;
|
window.location.href = `${this.credentials.node}/v1/server/file/download/${token}`;
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue