23/resumable.js

PHP implementation deletes created file immediately again

chris9734 opened this issue · 1 comments

In the function "createFileFromChunks"
if (($fp = fopen($temp_dir.'/'.$fileName, 'w')) !== false)
would have to be replaced with
if (($fp = fopen($temp_dir.'/../'.$fileName, 'w')) !== false)
otherwise the new created file gets deleted a few lines later with
rrmdir($temp_dir);

Thank you! Your comment saved me 👍