downloadPage.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <title>{{filename}} - {{hostname}} File Share</title>
  7. <meta name="description" content="File shared from {{hostname}}">
  8. <!-- Facebook Meta Tags -->
  9. <meta property="og:url" content="{{requri}}">
  10. <meta property="og:type" content="website">
  11. <meta property="og:title" content="{{filename}}">
  12. <meta property="og:description" content="File shared from {{hostname}}">
  13. <meta property="og:image" content="{{opg_image}}">
  14. <!-- Twitter Meta Tags -->
  15. <meta name="twitter:card" content="summary_large_image">
  16. <meta property="twitter:domain" content="{{host}}">
  17. <meta property="twitter:url" content="{{requri}}">
  18. <meta name="twitter:title" content="{{filename}}">
  19. <meta name="twitter:description" content="File shared from {{hostname}}">
  20. <meta name="twitter:image" content="{{opg_image}}">
  21. <link rel="stylesheet" href="../../script/skeleton/offline.css">
  22. <link rel="stylesheet" href="../../script/skeleton/normalize.css">
  23. <link rel="stylesheet" href="../../script/skeleton/skeleton.css">
  24. <script type="application/javascript" src="../../script/jquery.min.js"></script>
  25. <link rel="icon" type="image/png" href="../../img/public/share/share.png" />
  26. <style>
  27. body{
  28. padding-bottom: 100px;
  29. }
  30. .bar{
  31. height: 12px;
  32. background-color: #1a1a1a;
  33. width: 100%;
  34. }
  35. .footer{
  36. position: fixed;
  37. bottom: 0px;
  38. height: 50px;
  39. width: 100%;
  40. background-color: #1a1a1a;
  41. padding: 20px;
  42. color: white;
  43. }
  44. .filename{
  45. word-break: break-word;
  46. }
  47. </style>
  48. </head>
  49. <body>
  50. <div class="bar"></div>
  51. <br>
  52. <div class="container">
  53. <h5>{{hostname}} File Sharing</h5>
  54. <h3 class="filename">{{filename}}</h3>
  55. <div class="row">
  56. <div class="one-half column">
  57. <table class="u-full-width">
  58. <thead>
  59. <tr>
  60. <th>Property</th>
  61. <th>Value</th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. <tr>
  66. <td>MIME Type</td>
  67. <td>{{mime}}</td>
  68. </tr>
  69. <tr>
  70. <td>File Extension</td>
  71. <td>{{ext}}</td>
  72. </tr>
  73. <tr>
  74. <td>File Size</td>
  75. <td>{{size}}</td>
  76. </tr>
  77. <tr>
  78. <td>Last Modification Time</td>
  79. <td>{{modtime}}</td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. <a href="{{downloadurl}}"><button class="button-primary">Download</button></a>
  84. <button id="sharebtn" onclick="share();">Share</button>
  85. <br><br>
  86. <p>Request File ID: {{reqid}}</p>
  87. <p>Request Timestamp: {{reqtime}}</p>
  88. </div>
  89. <div class="one-half column">
  90. {{previewer}}
  91. <!-- <img style="pointer-events: none;" src=""> -->
  92. </div>
  93. </div>
  94. </div>
  95. <div class="footer">
  96. <div class="container">
  97. Cloud File Sharing Interface, Powered by <a style="color: white;" href="http://arozos.com">arozos</a>
  98. </div>
  99. </div>
  100. <script>
  101. if (location.protocol !== 'https:') {
  102. document.getElementById("sharebtn").remove()
  103. }
  104. function share(){
  105. let shareData = {
  106. title: "{{filename}}",
  107. text: '{{filename}} - File Share from {{hostname}}',
  108. url: window.location.href,
  109. }
  110. navigator.share(shareData).then(() =>
  111. function(){
  112. //Share succ
  113. }
  114. ).catch((e) =>
  115. function(){
  116. //Share failed
  117. }
  118. )
  119. }
  120. </script>
  121. </body>
  122. </html>