[GH-ISSUE #306] No preview of files as User #226

Closed
opened 2026-03-02 15:57:00 +03:00 by kerem · 1 comment
Owner

Originally created by @kniazio on GitHub (Feb 16, 2020).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/306

As an admin I have the opportunity to view pdf, jpg, doc.
As a user, I don't have this option anymore
Why?
`// Auth with login/password
// set true/false to enable/disable it
// Is independent from IP white- and blacklisting
$use_auth = true;

// Login user name and password
// Users: array('Username' => 'Password', 'Username2' => 'Password2', ...)
// Generate secure password hash - https://tinyfilemanager.github.io/docs/pwd.html
$auth_users = array(
'kniazio' => 'xxxxxxxxxxxx', //admin
'halina' => 'yyyyyyyyyyyy', //user1
'gregory' => 'zzzzzzzzzzzzzz' //user2
);

// Readonly users
// e.g. array('users', 'guest', ...)
$readonly_users = array(
// 'user'
);

// user specific directories
// array('Username' => 'Directory path', 'Username2' => 'Directory path', ...)
$directories_users = array(

'halina' => $_SERVER['DOCUMENT_ROOT'].'/halina',
'gregory' => $_SERVER['DOCUMENT_ROOT'].'/gregory'

);
// Enable highlight.js (https://highlightjs.org/) on view's page
$use_highlightjs = true;

// highlight.js style
$highlightjs_style = 'vs';

// Enable ace.js (https://ace.c9.io/) on view's page
$edit_files = true;

// Default timezone for date() and time()
// Doc - http://php.net/manual/en/timezones.php
$default_timezone = 'Europe/Warsaw'; // UTC

// Root path for file manager
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
$root_path = $_SERVER['DOCUMENT_ROOT'];

// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
// Will not working if $root_path will be outside of server document root
$root_url = '';

// Server hostname. Can set manually if wrong
$http_host = $_SERVER['HTTP_HOST'];`

Originally created by @kniazio on GitHub (Feb 16, 2020). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/306 As an admin I have the opportunity to view pdf, jpg, doc. As a user, I don't have this option anymore Why? `// Auth with login/password // set true/false to enable/disable it // Is independent from IP white- and blacklisting $use_auth = true; // Login user name and password // Users: array('Username' => 'Password', 'Username2' => 'Password2', ...) // Generate secure password hash - https://tinyfilemanager.github.io/docs/pwd.html $auth_users = array( 'kniazio' => 'xxxxxxxxxxxx', //admin 'halina' => 'yyyyyyyyyyyy', //user1 'gregory' => 'zzzzzzzzzzzzzz' //user2 ); // Readonly users // e.g. array('users', 'guest', ...) $readonly_users = array( // 'user' ); // user specific directories // array('Username' => 'Directory path', 'Username2' => 'Directory path', ...) $directories_users = array( 'halina' => $_SERVER['DOCUMENT_ROOT'].'/halina', 'gregory' => $_SERVER['DOCUMENT_ROOT'].'/gregory' ); // Enable highlight.js (https://highlightjs.org/) on view's page $use_highlightjs = true; // highlight.js style $highlightjs_style = 'vs'; // Enable ace.js (https://ace.c9.io/) on view's page $edit_files = true; // Default timezone for date() and time() // Doc - http://php.net/manual/en/timezones.php $default_timezone = 'Europe/Warsaw'; // UTC // Root path for file manager // use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder' $root_path = $_SERVER['DOCUMENT_ROOT']; // Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder' // Will not working if $root_path will be outside of server document root $root_url = ''; // Server hostname. Can set manually if wrong $http_host = $_SERVER['HTTP_HOST'];`
kerem closed this issue 2026-03-02 15:57:01 +03:00
Author
Owner

@kniazio commented on GitHub (Feb 16, 2020):

$dir_path='uploads/' . $_SESSION['username'] . '/' . $file;
It works

<!-- gh-comment-id:586717423 --> @kniazio commented on GitHub (Feb 16, 2020): `$dir_path='uploads/' . $_SESSION['username'] . '/' . $file;` It works
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#226
No description provided.