Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Add support for duplicate filenames #3358

Closed
wants to merge 3 commits into from

Conversation

DeveloperKid
Copy link

Hey guys,

i build myself a solution for duplicate files/filenames on the server.
Works pretty well atm on my machine, maybe have a look at it.

            int k = 1;
            while (File.Exists(path1 + "\\files\\" + fileInfo.name))
            {
                if (fileInfo.name.IndexOf("Copy " + (k - 1) + " of ") >= 0)
                    fileInfo.name = fileInfo.name.Replace("Copy " + (k - 1) + " of ", "Copy " + k + " of ");
                else
                    fileInfo.name = "Copy " + k + " of " + fileInfo.name;
                k++;
            }

swhitley and others added 3 commits May 18, 2012 15:55
Server should respond file names with the same encoding as original web page, UTF-8. Otherwise diacritics in file names would look corrupted.
Fix for handling filenames with diacritics
@blueimp
Copy link
Owner

blueimp commented Sep 26, 2014

Thanks for the contribution, @DeveloperKid.
While I usually don't add additional server-side upload handlers, if you provide a link (the github project page?) I can add it to the Wiki.

@blueimp blueimp closed this Sep 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants