I'm working on a website that allows the user to upload two files from a remote computer and displays the file paths as a confirmation. However, if the file paths are long, the card that holds the file paths can look cluttered. I had a few ideas, but when I implemented them, I was not convinced they were the best solution. Here's what I have tried:
- Display the file path starting from the first difference in them. For example, the two paths
/a/b/c/file
and/a/b/d/file
would result inc/file
andd/file
with the base path/a/b/
being displayed above the two paths.- Pros: Can save some space on very similar file paths
- Cons: There is very little savings if the paths aren't similar.
- Only show the file name, and hover over it to see the full path (with click-to-copy functionality).
- Pros: The file names themselves are short
- Cons: Both files potentially can have the same name (but different paths), thus at first glance, it may seem redundant to have the same file name displayed twice on the screen.
Please let me know what you guys have tried, or any suggestions you may have with my problem.