...First of all - nice job - a couple of tweaks you might consider
- php: make it super clear that a file has not uploaded
if (empty($_FILES['data']['tmp_name'])) { echo 'ERROR (no file sent)'; die(); }
- php: after upload - a text tweak
echo 'DONE (NEW UPLOAD)';die();
- php: give the "no file" download page a similar style as to main page
if (isset($_GET['type']) && $_GET['type'] == 'download')
{
if (!file_exists($thefiledata) || !file_exists($thefilename))
{
echo '<html><head><meta content="width=device-width, initial-scale=1.0" name="viewport"><style type="text/css">*{color:white;font-family:sans-serif;padding:0;margin:0;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{width:100%;top:0;position:absolute;background-color:#f90;height:100%;left:0}a{position:absolute;top:0;height:100%;text-align:center;width:100%;text-decoration:none;display:block}a div{position:relative;top:45%;height:auto;text-align:center;width:100%;font-size:2em;text-decoration:none}a span{font-size:70%}</style><title></title></head><body> <a href="./"><div>NO FILE UPLOADED YET<br /><span>CLICK/TAP TO RELOAD PAGE</span></div></a></body></html>';
exit;
}
- html: extra meta
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="File Share">
- icons
<link rel="shortcut icon" href="favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="180x180" href="touch-icon-180x180.png" />
regards, Col
...First of all - nice job - a couple of tweaks you might consider
if (empty($_FILES['data']['tmp_name'])) { echo 'ERROR (no file sent)'; die(); }echo 'DONE (NEW UPLOAD)';die();regards, Col