-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add 'jfif' to spport the picture file with extern name 'jfif' to show normally #1269
Open
imcraftsman
wants to merge
4
commits into
prasathmani:master
Choose a base branch
from
imcraftsman:tinyfilemanagerSelf
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
running envirement: Android 4.4+PHP 7.4.3+ KSWEB http://192.168.1.2/tinyfilemanager.php, afer login,the main page could not be showed entirely,it just shows half of navigation bar. that's becuase of there are two same lines of codes which cause the problem. they are $owner = posix_getpwuid(fileowner($path . '/' . $f)); when the funciton fileowner($path . '/' . $f) return 0 and run the function posix_getpwuid(....), it trig an error. please check the codes in line 2156--2168 and 2221--2233 suggest replace these two parts with followed codes: $owner = array('name' => '?'); $group = array('name' => '?'); if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) { try{ $owner_id = fileowner($path . '/' . $f); if($owner_id != 0) { $owner_info = posix_getpwuid($owner_id); if ($owner_info) { $owner = $owner_info; } } $group_id = filegroup($path . '/' . $f); $group_info = posix_getgrgid($group_id); if ($group_info) { $group = $group_info; } } catch(Exception $e){ error_log("exception:" . $e->getMessage()); } }
add codes to support picture file with extern name 'jfif'
There is a clerical error in lin "$fileTypes['jfif'] = 'image/jpg';" it should be "$fileTypes['jfif'] = 'image/jfif';" |
imcraftsman
commented
Jan 22, 2025
tinyfilemanager.php
Outdated
@@ -3288,6 +3289,7 @@ function fm_get_file_mimes($extension) | |||
$fileTypes['gif'] = 'image/gif'; | |||
$fileTypes['png'] = 'image/png'; | |||
$fileTypes['jpeg'] = 'image/jpg'; | |||
$fileTypes['jfif'] = 'image/jpg'; |
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.
There is a clerical error in lin "$fileTypes['jfif'] = 'image/jpg';" it should be "$fileTypes['jfif'] = 'image/jfif';"
when we login as an ordinary client, our folders which assigned by the administrator are usually not in the webserver root directory. so, we could not get the file's hyperlink, and we could not preview our pictures and watch our video online. now, the problem is solved. I add a proxy to settle this. modified list: 1) add a proxy; 2) modify image's/video's hyperlinks 3) modify file's 'direct link' related with open button. in addition: There is a clerical error in lin "$fileTypes['jfif'] = 'image/jpg';" it should be "$fileTypes['jfif'] = 'image/jfif';" in my another PR(PR id= prasathmani#1269)
imcraftsman
added a commit
to imcraftsman/tinyfilemanager
that referenced
this pull request
Jan 22, 2025
add proxy to show image/vedio out of the webserver root directory when we login as an ordinary client, our folders which assigned by the administrator are usually not in the webserver root directory. so, we could not get the file's hyperlink, and we could not preview our pictures and watch our video online. now, the problem is solved. I add a proxy to settle this. modified list: 1) add a proxy; 2) modify image's/video's hyperlinks 3) modify file's 'direct link' related with open button. in addition: There is a clerical error in lin "$fileTypes['jfif'] = 'image/jpg';" it should be "$fileTypes['jfif'] = 'image/jfif';" in my another PR(PR id= prasathmani#1269)
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.
add 'jfif' to spport the picture file with extern name 'jfif' to show normally