gordon-matt / peachpie-responsive-file-manager

Responsive File Manager running on .NET Core with Peachpie
24 stars 16 forks source link

how to provide best security for access to this file manager in asp.net core? #10

Closed j-ghadiri closed 3 years ago

j-ghadiri commented 4 years ago

for example in session or ?

j-ghadiri commented 3 years ago

how to use section "SET SUBFOLDER AS ROOT AND MULTI-USER USE" on asp.net core sample?

gordon-matt commented 3 years ago

You can't use that directly. Instead, make use of the rootFolder parameter I have added. I modified the original RFM source code from this:

if (!isset($_SESSION['RF']["subfolder"])) {
    $_SESSION['RF']["subfolder"] = '';
}

to this:

if (isset($_GET['rootFolder']))
{
    $_SESSION['RF']["subfolder"] = $_GET["rootFolder"];
}
else if (!isset($_SESSION['RF']["subfolder"]))
{
    $_SESSION['RF']["subfolder"] = '';
}

So now you can use it like this:

<iframe src="/filemanager/dialog.php?type=1&relative_url=1&rootFolder=@rootFolder&fldr=&field_id=fieldID&ignore_last_position=1" frameborder="0" style="overflow:hidden;min-height:600px; height:100%;width:100%" height="100%" width="100%"></iframe>

You can see this example in Standalone.cshtml