mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2026-04-27 03:15:50 +03:00
[GH-ISSUE #1013] Incorrect file url for specified $directories_users array #655
Labels
No labels
Feature
Feature
Is It Really an Issue?
Need More Info
Request
Security
bug
duplicate
enhancement
enhancement
help wanted
invalid
pull-request
question
suggestion
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tinyfilemanager#655
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tonycstech on GitHub (Apr 8, 2023).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1013
$directories_users = array( 'sah' => 'img/SAH', 'sjmc' => 'img/SJMC' );When user is logged in, user is taken to specified directory as expected.
All files are listed as expected.
File location is showing correct but the URL to file is wrong.
its double adding parts of the path.
Other changes made to the script are:
$root_path = $_SERVER['DOCUMENT_ROOT'].'/img';
$root_url = '/img';
.This issue does not effect admin account, only array users.
@tonycstech commented on GitHub (Apr 8, 2023):
File location:
P:/WWW/img/SAH/ENT/Dr. Pai Thyroid Extras.JPG
URL
http://localhost/SAH/ENT/Dr.%20Pai%20Thyroid%20Extras.JPG
Missing "img"
that is why i added
$root_url = '/img';
to fix that. But if i do, array users start to encounter double "img" in the file URL while admin does not.
@prasathmani commented on GitHub (Apr 8, 2023):
#724,
@tonycstech commented on GitHub (Apr 8, 2023):
The cause for my problem was:
I had admin defined in the
$auth_users = array(
but i gave no directory for admin below
$directories_users = array(
That made the URL's weird depending on what user is logged in and adding parts of missing URL to $root_url = '/img'; was causing the issue.
With $root_url = ''; being blank and admin properly given a directory, it worked.