Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
File in plupload with html5 will have their original name (renaming "…
Browse files Browse the repository at this point in the history
…blob" and special characters removal are fixed)
  • Loading branch information
thomasCresson committed Jul 1, 2013
1 parent 2856b43 commit 40aa819
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -44,7 +44,7 @@ class PluploadProcessor extends AJXP_Plugin {
// usleep(5000);

public function unifyChunks($action, &$httpVars, &$fileVars){
$filename = SystemTextEncoding::fromUTF8($fileVars["file"]["name"]);
$filename = SystemTextEncoding::fromUTF8($httpVars["name"]);
$tmpName = $fileVars["file"]["tmp_name"];
$chunk = $httpVars["chunk"];
$chunks = $httpVars["chunks"];
Expand All @@ -63,7 +63,7 @@ public function unifyChunks($action, &$httpVars, &$fileVars){
//error_log("Directory: ".$dir);

// Clean the fileName for security reasons
$filename = preg_replace('/[^\w\._]+/', '', $filename);
//$filename = preg_replace('/[^\w\._]+/', '', $filename);

// Look for the content type header
if (isset($_SERVER["HTTP_CONTENT_TYPE"]))
Expand Down

0 comments on commit 40aa819

Please sign in to comment.