Skip to content

Added delete feature and text viewer functionality - #131

Open
dayal18 wants to merge 1 commit into
mifi:masterfrom
dayal18:feature/file-delete-and-text-file-viewer
Open

dayal18 wants to merge 1 commit into
mifi:masterfrom
dayal18:feature/file-delete-and-text-file-viewer

Conversation

@dayal18

@dayal18 dayal18 commented Feb 13, 2026 •

Copy link
Copy Markdown
Contributor

This PR introduces two major features to improve file management and usability.

🚀 New Features

  1. File Deletion

Backend: Added a new DELETE /api/delete endpoint in packages/lib that securely removes files using fs.unlink. It includes path validation to prevent directory traversal attacks.

Frontend: Added a generic onDelete prop to the FileRow component in web/src/routes/dir/$dirId.tsx.

UI: A "Delete" (Trash) icon now appears next to files in the browser list. Clicking it triggers a confirmation prompt before deletion.

  1. Text File Viewer

Detection: Added mightBeText utility in web/src/util.ts to detect common text/code extensions (.txt, .md, .json, .js, etc.).

UI: Text files are now clickable in the file browser.

Viewer: The file viewer modal (web/src/routes/dir/$dirId/file.tsx) now supports fetching and displaying text content in a scrollable, dark-themed code block.

UX: Added user-select: text and proper zIndex handling to ensure text content is selectable and copyable, fixing issues with overlapping UI controls.

@dayal18

dayal18 commented Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

#130

@mifi

mifi commented Mar 13, 2026

Copy link
Copy Markdown
Owner

not sure about this... ezshare wasn't designed to be a fully fledged file manager really.

@dayal18

dayal18 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

It's alright, I understand. I personally use this as a file server for quick files transfer (not as a backup server). So I am using this version where I don't just have files lying around.

Also, when I copy from clipboard and use the function to save as text, it creates a random name which isn't clear if I have multiple things.

The only way to rename or delete any file that's not needed is through login into server (SSH), which is not feasible.

I can go ahead and close this if you prefer.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants