Saving to my own php server is no longer working. I didn't do anything. The 
only difference is the number of backups in the folder.
Can that be the problem?

El jueves, 13 de febrero de 2014 12:07:37 UTC+1, Danielo Rodríguez escribió:
>
> 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.

Reply via email to