forked from Alex/Pterodactyl-Panel
Fix file downloading permissions
This commit is contained in:
parent
8955b5a660
commit
ce911f827e
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<div class="action">Copy</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">
|
||||
<Icon name="download" class="h-4"/>
|
||||
</div>
|
||||
|
@ -39,7 +39,7 @@
|
||||
ref="contextMenu"
|
||||
/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
|
@ -18,7 +18,6 @@
|
||||
components: { SpinnerModal },
|
||||
|
||||
computed: mapState('server', {
|
||||
server: (state: ServerState) => state.server,
|
||||
credentials: (state: ServerState) => state.credentials,
|
||||
fm: (state: ServerState) => state.fm,
|
||||
}),
|
||||
@ -35,7 +34,7 @@
|
||||
mounted: function () {
|
||||
const path = join(this.fm.currentDirectory, this.file.name);
|
||||
|
||||
getDownloadToken(this.server.uuid, path)
|
||||
getDownloadToken(this.$route.params.id, path)
|
||||
.then((token) => {
|
||||
if (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 New Issue
Block a user