#90 Prefixing file names with the key
This commit is contained in:
parent
7cc2fcf479
commit
3b737fb286
@ -361,7 +361,7 @@ it with the HPR Volunteer at admin@hackerpublicradio.org
|
|||||||
foreach($_FILES["media_files"]["tmp_name"] as $key => $val) {
|
foreach($_FILES["media_files"]["tmp_name"] as $key => $val) {
|
||||||
if ( $_FILES["media_files"]["error"][ "$key"] == 0 ) {
|
if ( $_FILES["media_files"]["error"][ "$key"] == 0 ) {
|
||||||
$from = $_FILES["media_files"]["tmp_name"][ "$key"];
|
$from = $_FILES["media_files"]["tmp_name"][ "$key"];
|
||||||
$to = "${dir_structure}/" . $_FILES["media_files"]["name"][ "$key"] ;
|
$to = "${dir_structure}/${db_key}_" . $_FILES["media_files"]["name"][ "$key"] ;
|
||||||
$moveResult = move_uploaded_file($from, $to);
|
$moveResult = move_uploaded_file($from, $to);
|
||||||
if ($moveResult != true) {
|
if ($moveResult != true) {
|
||||||
echo "ERROR: File not moved correctly >$from< >$to<";
|
echo "ERROR: File not moved correctly >$from< >$to<";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user