Skip to content

fix: allow file request upload when part_file_in_storage=false - #62986

Merged
susnux merged 1 commit into
masterfrom
fix/nickname-upload-from-root
Aug 18, 2026
Merged

fix: allow file request upload when part_file_in_storage=false#62986
susnux merged 1 commit into
masterfrom
fix/nickname-upload-from-root

Conversation

@salmart-dev

@salmart-dev salmart-dev commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
  • Resolves: #

Summary

Setting the config value part_file_in_storage=false and trying to upload files in a file request, using local storage and providing a nickname always fail. The reason is that the storage wrapper fails to detect the case when the file gets uploaded in the root due to the configuration, failing the parent directory check and checking for the UPDATE permission instead of the CREATE one.

Note: the fix aims at restoring working upload requests. The already-existing problem that despite the configuration, uploads may not happen in the user's root is a separate issue.

Reproducing the issue

  • Set the config value part_file_in_storage=false
  • With a user create a folder in the root and create an upload request inside it
  • Open the link in an anonymous browser tab
  • Enter a nickname
  • Upload a file

Expected result

The file is uploaded

Actual result

The upload fails

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@salmart-dev salmart-dev self-assigned this Aug 6, 2026
@salmart-dev salmart-dev added the bug label Aug 6, 2026
@salmart-dev
salmart-dev requested a review from a team as a code owner August 6, 2026 16:54
@salmart-dev salmart-dev added 3. to review Waiting for reviews 32-feedback labels Aug 6, 2026
@salmart-dev
salmart-dev requested review from Altahrim, icewind1991, leftybournes and provokateurin and removed request for a team August 6, 2026 16:54
The part_file_in_storage option being disabled, causes files to be
uploaded in the user's root, rather than in the final directory. This,
in combination with the use of upload nicknames, was not detected by the
patched check, causing uploads to check for the UPDATE permissions,
which is not granted for file requests, making all uploads always fail.

Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
@salmart-dev
salmart-dev force-pushed the fix/nickname-upload-from-root branch from 8aed8e4 to 54b796f Compare August 10, 2026 08:37
@susnux
susnux merged commit 9d164fb into master Aug 18, 2026
216 checks passed
@susnux
susnux deleted the fix/nickname-upload-from-root branch August 18, 2026 12:19
@salmart-dev

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@salmart-dev

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@salmart-dev

Copy link
Copy Markdown
Contributor Author

/backport to stable32

@backportbot

backportbot Bot commented Aug 18, 2026

Copy link
Copy Markdown

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/62986/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 54b796fb

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/62986/stable32

Error: Failed to check for changes with origin/stable32: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants