nextcloud / nextcloud/server

Uploading `.part` files (from another program)

Open
#49,916 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement hotspot: filename handling
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
We use a program that creates files with a .part extension, we would like to upload those files to Nextcloud.
Unfortunately the .part extension is forbidden and is hardcoded here.

(This program is not supported anymore and we can't change the extension of the files generated)

Describe the solution you'd like

  1. Having a system that change the extension of incoming files to something random and translate it to the original extension for the outgoing files
  2. A way to allow .part extension -> By overiding it in the config for example
  3. Using a really random extension (a uid for example)
  4. Allow users to configure a specific extension in place of ".part"

Describe alternatives you've considered
I tried to make an app that does the solution n° 1. That's how I discovered that the .part was hardcoded inside the getForbiddenExtensions()

Additional context
I'm willing to do a pull request and help make this feature. But I have no idea of how big of a change this is. However I think the solution n°1 I described would be a good solution, as it would completly negate the problems with sending files like .htaccess or *.part and so on.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/private/Files/FilenameValidator.php and its getForbiddenExtensions() method, which currently hardcodes the forbidden .part extension. Compare the proposed configuration and renaming approaches, then clarify the desired behavior and security constraints before defining what a complete change would need to preserve.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.