Skip to content

Implement file upload functionality in Diffyne#6

Merged
xentixar merged 4 commits into
diffyne:mainfrom
xentixar:feature/file-upload-cleanup
Dec 9, 2025
Merged

Implement file upload functionality in Diffyne#6
xentixar merged 4 commits into
diffyne:mainfrom
xentixar:feature/file-upload-cleanup

Conversation

@xentixar

@xentixar xentixar commented Dec 9, 2025

Copy link
Copy Markdown
Contributor
  • Added a new FileUploadService to handle file uploads, including temporary storage and cleanup.
  • Integrated file upload handling in the Diffyne class, allowing components to upload files via the new handleFileUpload method.
  • Updated EventBinder to bind file input events and trigger the file upload process.
  • Introduced new routes for file upload and preview in the DiffyneController, with validation for file size and type.
  • Enhanced the VNodeConverter to support SVG elements and their attributes.
  • Added a scheduled command for cleaning up old temporary files.

This commit enhances the Diffyne framework by providing robust file upload capabilities, improving user experience and component functionality.

- Added a new FileUploadService to handle file uploads, including temporary storage and cleanup.
- Integrated file upload handling in the Diffyne class, allowing components to upload files via the new handleFileUpload method.
- Updated EventBinder to bind file input events and trigger the file upload process.
- Introduced new routes for file upload and preview in the DiffyneController, with validation for file size and type.
- Enhanced the VNodeConverter to support SVG elements and their attributes.
- Added a scheduled command for cleaning up old temporary files.

This commit enhances the Diffyne framework by providing robust file upload capabilities, improving user experience and component functionality.
@xentixar xentixar self-assigned this Dec 9, 2025
@xentixar xentixar added enhancement New feature or request backend Backend/server-side related changes frontend Frontend/client-side related changes labels Dec 9, 2025
- Removed 'X-CSRF-TOKEN' header from TransportService to streamline requests.
- Updated allowed headers in the CORS configuration to enhance security.
- Changed the visibility of the getTemporaryFilePreviewUrl method in the Component class to public for accessibility in Blade views.
- Made the component instance available in the view data during rendering in the Renderer class.

These changes improve the overall structure and security of the Diffyne framework while enhancing component functionality.
- Cleaned up unnecessary whitespace in the Component, FileUploadService, and DiffyneController classes to enhance code clarity.
- Updated the DiffyneController to handle file uploads more robustly, including improved validation for uploaded files.
- Made minor adjustments to method signatures and added type hints for better type safety.

These changes contribute to a cleaner codebase and improved maintainability of the Diffyne framework.
… and metadata management

- Updated the moveTemporaryFile method to optionally use the original filename for permanent storage.
- Introduced metadata handling in the FileUploadService to store and retrieve original filenames and other file attributes.
- Added a new method to get the original filename for temporary files, improving file management capabilities.

These changes improve the robustness of the file upload process in the Diffyne framework, enhancing user experience and maintainability.
@xentixar xentixar merged commit c4942cb into diffyne:main Dec 9, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend/server-side related changes enhancement New feature or request frontend Frontend/client-side related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant