-
-
Notifications
You must be signed in to change notification settings - Fork 254
Fix mime type for jar files #1757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@Boy132 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 24 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdjusted mime_type resolution in app/Models/File.php getRows: when a file name ends with .jar and the detected MIME is in ARCHIVE_MIMES, the mime_type is set to application/jar; otherwise, the original MIME is used. No public API changes; overall row structure and error handling unchanged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as Panel UI
participant Backend as Backend (File::getRows)
participant FS as Filesystem
User->>UI: Open file manager
UI->>Backend: Request file list
Backend->>FS: Read directory entries
FS-->>Backend: File metadata (name, size, mime, ...)
rect rgb(230,240,255)
note over Backend: MIME resolution (changed)
Backend->>Backend: For each file: if name endsWith ".jar" AND mime ∈ ARCHIVE_MIMES<br/>then mime = "application/jar"<br/>else keep original mime
end
Backend-->>UI: Rows with resolved mime_type
UI-->>User: Render file list (icons based on mime_type)
Pre-merge checks✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Shouldn't this be handled on wings ? |
No. This is purely a frontend QoL change. |
Closes #1755
If the file name ends with
.jarbut the mime type is an archive (e.g. a zip) change the mime type toapplication/jar.