Implement file upload functionality in Diffyne#6
Merged
Conversation
- 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.
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit enhances the Diffyne framework by providing robust file upload capabilities, improving user experience and component functionality.