Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/files/src/views/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<!-- Uploader -->
<UploadPicker v-if="canUpload && !isQuotaExceeded && currentFolder"
allow-folders
:allow-folders="canUploadFolders"
class="files-list__header-upload-button"
:content="getContent"
:destination="currentFolder"
Expand Down Expand Up @@ -282,6 +282,14 @@ export default defineComponent({
},

computed: {
canUploadFolders() {
// TODO: Remove this small files_sharing hack when https://github.com/nextcloud/server/issues/15921 is implmented
if (this.currentView?.id === 'public-file-drop') {
return false
}
return true
},

/**
* Get a callback function for the uploader to fetch directory contents for conflict resolution
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
:name="t('files_sharing', 'Terms of service')"
:message="disclaimer" />
</template>
<UploadPicker allow-folders
:content="() => []"
<UploadPicker :content="() => []"
no-menu
:destination="uploadDestination"
multiple />
Expand Down
23 changes: 14 additions & 9 deletions cypress/e2e/files_sharing/public-share/view_file-drop.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ describe('files_sharing: Public share - File drop', { testIsolation: true }, ()
.should('not.exist')
})

it('Can only see upload files and upload folders menu entries', () => {
// TODO: reenable folder upload with https://github.com/nextcloud/server/issues/15921
it.skip('Can only see upload files and upload folders menu entries', () => {
cy.contains(`Upload files to ${shareName}`)
.should('be.visible')

Expand All @@ -87,6 +88,16 @@ describe('files_sharing: Public share - File drop', { testIsolation: true }, ()
.findAllByRole('menuitem')
.should('have.length', 2)
})
it('Can only see upload files', () => {
cy.contains(`Upload files to ${shareName}`)
.should('be.visible')

cy.findByRole('button', { name: 'New' })
.should('be.visible')
.click()
cy.findByRole('menu')
.should('not.exist')
})

it('Can only see dedicated upload button', () => {
cy.contains(`Upload files to ${shareName}`)
Expand All @@ -95,15 +106,9 @@ describe('files_sharing: Public share - File drop', { testIsolation: true }, ()
cy.findByRole('button', { name: 'Upload' })
.should('be.visible')
.click()
// See upload actions
cy.findByRole('menuitem', { name: 'Upload files' })
.should('be.visible')
cy.findByRole('menuitem', { name: 'Upload folders' })
.should('be.visible')
// But no other
// But no menu
cy.findByRole('menu')
.findAllByRole('menuitem')
.should('have.length', 2)
.should('not.exist')
})

it('Can upload files', () => {
Expand Down
2 changes: 2 additions & 0 deletions dist/201-201.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/201-201.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/201-201.js.map.license
2 changes: 0 additions & 2 deletions dist/9087-9087.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/9087-9087.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/9087-9087.js.map.license

This file was deleted.

4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-init-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-init-public.js.map

Large diffs are not rendered by default.

Loading