Skip to content

feat(dav): Enable chunked upload for public shares - #52182

Merged
skjnldsv merged 6 commits into
masterfrom
feat/dav/public-share-chunked-upload
May 6, 2025
Merged

feat(dav): Enable chunked upload for public shares#52182
skjnldsv merged 6 commits into
masterfrom
feat/dav/public-share-chunked-upload

Conversation

@provokateurin

@provokateurinprovokateurin commented Apr 14, 2025

Copy link
Copy Markdown
Member

Summary

Allows using our existing chunked upload mechanisms on public shares as well 🚀
Needs this PR for @nextcloud/upload: nextcloud-libraries/nextcloud-upload#1705

Checklist

Comment threadapps/dav/lib/Capabilities.php Outdated
@provokateurin
provokateurinforce-pushed the feat/dav/public-share-chunked-upload branch 2 times, most recently from 1a8d67a to bb6fc88CompareApril 15, 2025 06:37
@susnux
susnux requested review from come-nc and removed request for sorbaughApril 16, 2025 12:37
Comment threadapps/dav/lib/Connector/Sabre/ServerFactory.php
Comment threadapps/dav/lib/Files/Sharing/RootCollection.php
Comment threadapps/dav/lib/Files/Sharing/RootCollection.php Outdated
@susnux

Copy link
Copy Markdown
Contributor

Tests need to be adjusted otherwise this seems to be good to me

There were 3 failures:

  1. OCA\DAV\Tests\Files\Sharing\FilesDropPluginTest::testValid
    Expectation failed for method name is "setUrl" when invoked 1 time(s)
    Parameter 0 for invocation Sabre\HTTP\RequestInterface::setUrl('https://example.comfiles//file.txt') does not match expected value.
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'https://example.com/file.txt'
    +'https://example.comfiles//file.txt'

/home/runner/actions-runner/_work/server/server/apps/dav/lib/Files/Sharing/FilesDropPlugin.php:89
/home/runner/actions-runner/_work/server/server/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php:102

  1. OCA\DAV\Tests\Files\Sharing\FilesDropPluginTest::testFileAlreadyExistsValid
    Expectation failed for method name is "setUrl" when invoked 1 time(s)
    Parameter 0 for invocation Sabre\HTTP\RequestInterface::setUrl('https://example.comfiles//file (2).txt') does not match expected value.
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'https://example.com/file (2).txt'
    +'https://example.comfiles//file (2).txt'

/home/runner/actions-runner/_work/server/server/apps/dav/lib/Files/Sharing/FilesDropPlugin.php:89
/home/runner/actions-runner/_work/server/server/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php:132

  1. OCA\DAV\Tests\Files\Sharing\FilesDropPluginTest::testNoSubdirPut
    Expectation failed for method name is "setUrl" when invoked 1 time(s)
    Parameter 0 for invocation Sabre\HTTP\RequestInterface::setUrl('https://example.comfiles//file (2).txt') does not match expected value.
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'https://example.com/file (2).txt'
    +'https://example.comfiles//file (2).txt'

/home/runner/actions-runner/_work/server/server/apps/dav/lib/Files/Sharing/FilesDropPlugin.php:89
/home/runner/actions-runner/_work/server/server/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php:175

--

@come-nccome-nc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good apart from keyboard stutter, I did not test.

Comment threadapps/dav/lib/Connector/Sabre/Directory.php Outdated
Comment threadapps/dav/lib/Connector/Sabre/ServerFactory.php Outdated
Comment threadapps/dav/lib/Connector/Sabre/ServerFactory.php Outdated
Signed-off-by: provokateurin <kate@provokateurin.de>
…ublic shares
Signed-off-by: provokateurin <kate@provokateurin.de>
…rvice
Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin
provokateurinforce-pushed the feat/dav/public-share-chunked-upload branch from 3f5c992 to 46f5b07CompareMay 5, 2025 11:32
@provokateurin
provokateurin requested a review from come-ncMay 5, 2025 11:32
Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin
provokateurin requested a review from a team as a code ownerMay 5, 2025 13:28

@susnuxsusnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⬆️ Allow chunked public upload

4 participants

@provokateurin@susnux@skjnldsv@come-nc