Hi Danielo With the proviso that I don't know PHP, that looks like the right place.
Best wishes Jeremy On Thu, Feb 13, 2014 at 11:07 AM, Danielo Rodríguez <[email protected]>wrote: > Hello, > > Now that I can upload my TW directly to my server I want to run some > custom functions after a successfully upload. > I suppose that I have to add my new lines inside the if statement that > starts at line 309, but I 'm not sure where. > > Jeremy, could you please confirm where should I? > > Here is where I suspect > // move uploaded file to uploadDir > if (move_uploaded_file($_FILES['userfile']['tmp_name'], $destfile)) { > if ($FOLD_JS) { > // rewrite the file to replace JS content > $fileContent = file_get_contents ($destfile); > $fileContent = replaceJSContentIn($fileContent); > if (!$handle = fopen($destfile, 'w')) { > echo "Cannot open file ($destfile)"; > exit; > } > if (fwrite($handle, $fileContent) === FALSE) { > echo "Cannot write to file ($destfile)"; > exit; > } > fclose($handle); > } > > chmod($destfile, 0644); > if($DEBUG) { > echo "Debug mode \n\n"; > } > if (!$backupError) { > echo "0 - File successfully loaded in " .$destfile. "\n"; > <<<<<<MABYE > HERE? > } else { > echo "BackupError : $backupError - File successfully > loaded in " .$destfile. "\n"; > } > echo("destfile:$destfile \n"); > if (($backupFilename) && (!$backupError)) { > echo "backupfile:$backupFilename\n"; > } > $mtime = filemtime($destfile); > echo("mtime:$mtime"); > > } > else { > echo "Error : " . $_FILES['error']." - File NOT uploaded !\n"; > > } > > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/tiddlywiki. > For more options, visit https://groups.google.com/groups/opt_out. > -- Jeremy Ruston mailto:[email protected] -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/groups/opt_out.

