josephernest / Yopp

A very fast way to transfer a file from phone to computer and vice versa.
400 stars 31 forks source link

Some Enhancements for Consideration #1

Open coldes opened 7 years ago

coldes commented 7 years ago

...First of all - nice job - a couple of tweaks you might consider

  1. php: make it super clear that a file has not uploaded if (empty($_FILES['data']['tmp_name'])) { echo 'ERROR (no file sent)'; die(); }
  2. php: after upload - a text tweak echo 'DONE (NEW UPLOAD)';die();
  3. 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;
    }
  4. 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">
  5. icons
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="180x180" href="touch-icon-180x180.png" />

    regards, Col

josephernest commented 7 years ago

Hi @coldes Thanks for your comments! I'll definitely use 3, good idea.

Question: what is the purpose of Apple specific lines (<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">), what does it do on Mac/iPhone?

Same question for <link rel="apple-touch-icon-precomposed" sizes="180x180" href="touch-icon-180x180.png" />.

About 5: would you do a favicon with half rose(or is it red?) on top, and half blue rectangle on bottom (same colors as the site)?

I'm open for a pull request :)

coldes commented 7 years ago

... re apple stuff - makes this web page on ios when "add to home screen" a web app - ie now has a screen icon, and launches full screen when tapped - and yes #5 would make a fitting fav icon - I'm just using my own branding icon - if you want - can create a favicon and app icon graphics based on site and send thru

On 27 October 2017 at 20:55, josephernest notifications@github.com wrote:

Hi @coldes https://github.com/coldes Thanks for your comments! I'll definitely use 3, good idea.

Question: what is the purpose of Apple specific lines (<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">), what does it do on Mac/iPhone?

Same question for <link rel="apple-touch-icon-precomposed" sizes="180x180" href="touch-icon-180x180.png" />.

About 5: would you do a favicon with half rose(or is it red?) on top, and half blue rectangle on bottom (same colors as the site)?

I'm open for a pull request :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/josephernest/Yopp/issues/1#issuecomment-339928179, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXeHI8vkpW78nAGqPrpHy369rdsEtLhks5swaiTgaJpZM4QIr2m .

josephernest commented 7 years ago

@coldes Feel free to do a pull request with all these things, it seems useful!

PS: what does <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> do?

coldes commented 7 years ago

https://stackoverflow.com/questions/22501453/what-will-this-do-meta-http-equiv-x-ua-compatible-content-ie-edge

On 3 November 2017 at 21:56, josephernest notifications@github.com wrote:

@coldes https://github.com/coldes Feel free to do a pull request with all these things, it seems useful!

PS: what does do?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/josephernest/Yopp/issues/1#issuecomment-341672928, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXeHH0SglioZAiqvAirURH9Ol4lC-8nks5syvFPgaJpZM4QIr2m .