Fix file downloading permissions

This commit is contained in:
Dane Everitt 2019-03-16 17:16:34 -07:00
parent 8955b5a660
commit ce911f827e
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
4 changed files with 4 additions and 5 deletions

View File

@ -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>

View File

@ -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"/>

View File

@ -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