Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.
This repository was archived by the owner on Aug 31, 2026. It is now read-only.

Replace feature not working (409 conflict) #5980

Closed

Description

@rumzie

Checklist

Version

2.63.14

Description

This bug was reported and fixed recently, however I am still running into it.

#5957

After updating, I am still getting the 409 conflict message.

What did you expect to happen?

Duplicate file upload should display the modal with the actions

What actually happened?

It displays the 409 alert.

Reproduction Steps

Upload file with drag and drop
Upload a file with the same name using drag and drop

Files

Image

No response

Activity

  1. hacdias commented on Jun 8, 2026

    @hacdias
    Member

    Hmm, I just tried to reproduce, but I couldn't. Specific OS/browser?

  2. rumzie commented on Jun 8, 2026

    @rumzie
    Author

    That is very odd.
    Running Windows 11, tried in chrome and firefox with the same result.
    Tried with txt/jpg/png files.

  3. rumzie commented on Jun 8, 2026

    @rumzie
    Author

    If it helps, I can create a guest login for the devs to replicate on my server.

  4. psyonly commented on Jun 9, 2026

    @psyonly

    It can also be reproduced in the Edge browser of Windows 10.

  5. hacdias commented on Jun 9, 2026

    @hacdias
    Member

    Perhaps it's a Windows-specific thing, I'm using macOS. Maybe something to do with the filepath separator.

  6. drapadon commented on Jun 9, 2026

    @drapadon

    also having the same issue.

    running windows 10 with brave. tried testing it on chrome as well, same outcome.

  7. rumzie commented on Jun 17, 2026

    @rumzie
    Author

    has anyone running on windows NOT run into this issue after updating?

  8. hacdias commented on Jun 27, 2026

    @hacdias
    Member

    Could you see if this is fixed on Windows with the latest patch version?

  9. steeldomejeff commented on Jun 27, 2026

    @steeldomejeff

    I am able to reproduce. I tested various scenarios and it appears to happen if I am replacing a file that has a directory/subdirectory path which contains a space.

    For example:

    / - to root (works)
    /MyMainDir (works)
    /MyMainDir/My SubDir (fails with 409 conflict error)

    The URL that appears in the browser (chrome based) is this: https://192.168.59.101/files/MyMainDir/My SubDir/

    Where my other rig which is running an older version (v2.63.1), the URL appears as: https://192.168.59.101/files/MyMainDir/My%20SubDir/

    Seems to be related to escaping the spaces.

  10. rumzie commented on Jun 28, 2026

    @rumzie
    Author

    Issue looks fixed for me running 2.63.17

  11. steeldomejeff commented on Jun 28, 2026

    @steeldomejeff

    This fix worked for me. Tested it with directories and filenames containing spaces.

    1. Update frontend/src/utils/url.ts

    Add these helpers after encodePath:

    export function decodePath(str: string) {
      return str
        .split("/")
        .map((v) => {
          try {
            return decodeURIComponent(v);
          } catch {
            return v;
          }
        })
        .join("/");
    }
    
    export function encodeExistingPath(str: string) {
      return encodePath(decodePath(str));
    }
    

    Then update the default export:

    export default {
      encodeRFC5987ValueChars,
      removeLastDir,
      encodePath,
      decodePath,
      encodeExistingPath,
    };
    

    2. Update frontend/src/utils/upload.ts

    Change this:

    const normBase = removePrefix(basePath).replace(/\/+$/, "");
    

    to this:

    const normBase = url.decodePath(removePrefix(basePath)).replace(/\/+$/, "");
    

    Then change this:

    let path = base;
    

    to this:

    let path = url.encodeExistingPath(base);
    
  12. archit-goyal commented on Jul 20, 2026

    @archit-goyal
    Contributor

    I opened #6040 with a focused fix and regression tests for the remaining encoded-space destination case.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions