mirror of
https://github.com/arendst/Tasmota.git
synced 2025-11-17 06:51:02 +00:00
v3.9.4
This commit is contained in:
15
api/upload-arduino.php
Normal file
15
api/upload-arduino.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
// mkdir and chmod arduino folder to 777
|
||||
//
|
||||
//var_dump($_FILES);
|
||||
|
||||
$image = basename($_FILES["file"]["name"]);
|
||||
$target_file = "arduino/".$image;
|
||||
$hostname = $_SERVER['SERVER_NAME'];
|
||||
|
||||
if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) {
|
||||
echo "The file $image has been uploaded to OTA server $hostname. \n";
|
||||
} else {
|
||||
echo "Sorry, there was an error uploading your file $image to OTA server $hostname. \n";
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user