fix: Resolve multiple issues with upload to server functionality - #15
Merged
Merged
Conversation
This commit addresses several critical issues with the editor's upload to server feature: Server-side fixes: - Changed directory creation from DirectoryInfo.Create() to Directory.CreateDirectory() to ensure parent directories (including the assets folder) are created automatically - This fixes the issue where the assets folder was never created on the server Client-side fixes: - Fixed resource leaks by properly disposing file streams in a finally block - Improved retry logic to correctly handle and propagate exceptions after all retries fail - Added FormClosing event handler to save settings when the form is closed - Implemented persistence of the last selected directory, restoring it on form load - Added authentication status display to inform users whether they are logged in - Improved authentication error messages to guide users to log in through the editor - Fixed issue where server URL and other settings were only saved when clicking Upload These changes ensure that: 1. The server location is now remembered between sessions 2. The last selected directory is restored, improving user experience 3. The assets folder is automatically created on the server when needed 4. File uploads work reliably with proper error handling and resource management 5. Users receive clear feedback about authentication status Fixes issues reported in the editor where uploads would silently fail and the assets folder would never be created on the server.
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 addresses several critical issues with the editor's upload to server feature:
Server-side fixes:
Client-side fixes:
These changes ensure that:
Fixes issues reported in the editor where uploads would silently fail and the assets folder would never be created on the server.