Skip to content

Commit

Permalink
Merge pull request #235 from pravinTek/release-1.4.5
Browse files Browse the repository at this point in the history
Task#216 Fix: File name should be display in edit and detail view
  • Loading branch information
ankush-maherwal authored Dec 16, 2019
2 parents c883091 + a05fedd commit 7f4859c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion administrator/models/fields/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ protected function getInput()

// To get the file name from URL
$substrString = substr($data->mediaLink, strlen('fpht=') + strpos($data->mediaLink, 'fpht='));
$substrString = substr($substrString, 0, strpos($substrString, '&'));

// Check string having '&' character or not, to get correct file name decoded value
if (strpos($substrString, '&'))
{
$substrString = substr($substrString, 0, strpos($substrString, '&'));
}

// Decode the filename
$fileName = base64_decode($substrString);
Expand Down

0 comments on commit 7f4859c

Please sign in to comment.