[pull] master from Eloston:master#7
Open
pull[bot] wants to merge 11 commits intorrosajp:masterfrom
Open
Conversation
Reviewer's GuideIntroduces an asynchronous file transfer web service script with directory browsing and upload modes, plus two new systemd unit templates for mount management. Sequence Diagram for Directory Browsing (Tree Mode)sequenceDiagram
actor User
participant Server as "aioftws.py (Tree Mode)"
participant FileSystem
User->>Server: GET /{path}
Server->>Server: path = request.match_info['path']
Server->>Server: Validate path (not absolute, within CWD)
alt Path is directory
Server->>FileSystem: List directory contents (full_path.iterdir())
FileSystem-->>Server: Directory entries
Server->>Server: Generate HTML listing for path
Server-->>User: HTTP 200 OK (HTML Page with links)
else Path is file
Server->>FileSystem: Access file (full_path)
FileSystem-->>Server: File data
Server-->>User: HTTP 200 OK (FileResponse with file content)
else Path not found or access denied
Server-->>User: HTTP 40x/500 Error (e.g., 404, 403, 400)
end
Sequence Diagram for Requesting the File Upload PagesequenceDiagram
actor User
participant Browser
participant Server as "aioftws.py (Upload Mode)"
User->>Browser: Opens / (navigates to upload page URL)
Browser->>Server: GET /
Server->>Server: call handle_upload_page()
Server->>Server: Generate HTML for upload form
Server-->>Browser: HTTP 200 OK (HTML Upload Form)
Browser-->>User: Displays Upload Page
Class Diagram for TreeHTTPRequestHandlerclassDiagram
class TreeHTTPRequestHandler {
+get() web.Response
}
class View {
<<aiohttp.web.View>>
}
View <|-- TreeHTTPRequestHandler
class Request {
<<aiohttp.web.Request>>
+match_info
+transport
}
class Response {
<<aiohttp.web.Response>>
}
class FileResponse {
<<aiohttp.web.FileResponse>>
}
TreeHTTPRequestHandler ..> Request : uses
TreeHTTPRequestHandler ..> Response : creates
TreeHTTPRequestHandler ..> FileResponse : creates
class Path {
<<pathlib.Path>>
+is_absolute() bool
+resolve() Path
+is_relative_to(other Path) bool
+exists() bool
+is_dir() bool
+is_file() bool
+iterdir() Iterator[Path]
+parent Path
+name str
+as_posix() str
}
TreeHTTPRequestHandler ..> Path : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )