diff options
author | alexvitkov <44268717+alexvitkov@users.noreply.github.com> | 2021-01-29 12:52:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-29 12:52:06 +0200 |
commit | 33e533d28dbf9ad7bfc7ad9af467e5efe25ae8a0 (patch) | |
tree | 7b748d2b87ab018d7ff451b4111a1b88eeb58416 /php/upload.php | |
parent | ceedd596c9f39f53555fd0746a42d6b85cd49b6c (diff) | |
parent | 472e170f408e3d8d1db2eb066d445153aad55d73 (diff) | |
download | fileup-33e533d28dbf9ad7bfc7ad9af467e5efe25ae8a0.tar.gz |
Merge pull request #1 from GTSimeonov/master
rararrararararraar
Diffstat (limited to 'php/upload.php')
-rw-r--r-- | php/upload.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/php/upload.php b/php/upload.php new file mode 100644 index 0000000..93fa778 --- /dev/null +++ b/php/upload.php @@ -0,0 +1,23 @@ +<?php + +if (!array_key_exists('uf', $_FILES)) { + http_response_code(400); + exit(); +} + + +$file = $_FILES['uf']; + + +if (file['error'] != 0) { + http_response_code(400); + exit(); +} + +$m = md5_file($file['tmp_name']); + +copy($file['tmp_name'], "screen/$m.png"); + +echo "http://india.fmi.fail/screen/$m.png"; + +?> |