Skip to content

Fix/file upload#19

Merged
kek-Sec merged 3 commits intomainfrom
fix/file-upload
Jul 23, 2025
Merged

Fix/file upload#19
kek-Sec merged 3 commits intomainfrom
fix/file-upload

Conversation

@kek-Sec
Copy link
Copy Markdown
Owner

@kek-Sec kek-Sec commented Jul 23, 2025

This pull request introduces several enhancements, bug fixes, and refactorings to improve the user experience, file handling, and maintainability of the codebase. The most notable changes include updating the Create Secret page to use a slider toggle for type selection, improving file upload validation and error handling, and refactoring backend file handling logic for better reliability.

UI/UX Improvements:

  • Updated the Create Secret page to use a visually appealing slider toggle (v-btn-toggle) for "Text" and "File" type selection, replacing the dropdown.
  • Enhanced the PasswordInput component to include icons (mdi-lock) and outlined styling for better visual feedback.
  • Cleared all form inputs after successfully creating a secret to improve user experience.

Backend File Handling Enhancements:

  • Refactored file handling in handlers.go to explicitly parse multipart forms, improving reliability when handling mixed file/text forms.
  • Replaced deprecated ioutil functions with io and os equivalents for file reading and writing. [1] [2]

Bug Fixes:

  • Fixed an issue where file uploads would incorrectly show "Please select a file" even when a file was chosen.
  • Improved file validation in the frontend to ensure the selected file is a valid File object.

Documentation and Versioning:

  • Updated CHANGELOG.md to document the changes introduced in version 1.0.9.
  • Bumped the application version in version.yaml from 1.0.7 to 1.0.9.

@kek-Sec kek-Sec requested a review from Copilot July 23, 2025 12:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enhances the file upload functionality and user experience by fixing validation issues, improving UI components, and modernizing backend file handling. The changes address bugs where file uploads would incorrectly show validation errors and introduce a more intuitive slider-based type selection interface.

Key changes include:

  • Replaced dropdown with slider toggle for secret type selection with improved visual design
  • Fixed file upload validation logic to properly detect selected files
  • Modernized backend file handling by replacing deprecated ioutil functions and improving form parsing

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
version.yaml Version bump from 1.0.7 to 1.0.9
ui/src/pages/Create.vue Redesigned type selector UI, fixed file validation logic, and added form reset functionality
ui/src/components/PasswordInput.vue Updated component with outlined styling, lock icon, and modernized Vuetify slot syntax
internal/handlers/handlers.go Replaced deprecated ioutil functions, improved multipart form parsing, and streamlined file handling
CHANGELOG.md Documented changes for version 1.0.9

@@ -1,2 +1,2 @@
#Application version following https://semver.org/
version: 1.0.7 No newline at end of file
version: 1.0.9 No newline at end of file
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Version jumped from 1.0.7 to 1.0.9, skipping 1.0.8. While this may be intentional, consider ensuring version increments follow your project's versioning strategy consistently.

Copilot uses AI. Check for mistakes.
Comment on lines +154 to +155
// Debug log
console.log('files.value:', files.value);
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statement should be removed before merging to production as it can clutter the browser console and expose internal application state.

Suggested change
// Debug log
console.log('files.value:', files.value);

Copilot uses AI. Check for mistakes.
Comment on lines +154 to +155
// Debug log
console.log('files.value:', files.value);
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statement should be removed before merging to production as it can clutter the browser console and expose internal application state.

Suggested change
// Debug log
console.log('files.value:', files.value);

Copilot uses AI. Check for mistakes.
@kek-Sec kek-Sec merged commit 3280f28 into main Jul 23, 2025
9 of 11 checks passed
@kek-Sec kek-Sec deleted the fix/file-upload branch July 23, 2025 12:33
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