-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upload media in /tmp folder before moving them into media folder
to give more space to conversion process. - I keepi the empty test/fn.php file beccause otherwise I got an error. I don't know how to solve this.
- Loading branch information
1 parent
3e172d6
commit 8237680
Showing
6 changed files
with
65 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1 @@ | ||
<?php | ||
|
||
/** | ||
* Create a folder with an auto-generated naùe, in OS temp directory | ||
* | ||
* @param string $prefix A prefix to suit your case (It is nice to precise that is is related to W) | ||
* @return string Absolute created path | ||
*/ | ||
function mktempdir(string $prefix): string | ||
{ | ||
$tmp = sys_get_temp_dir(); | ||
$randstr = dechex(mt_rand() % (2 << 16)); | ||
$path = "$tmp/$prefix-$randstr"; | ||
if (!mkdir($path)) { | ||
throw new LogicException("cannot create tmp dir '$path'"); | ||
} | ||
return $path; | ||
} |