diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..04ccea4 --- /dev/null +++ b/.htaccess @@ -0,0 +1,21 @@ + +Options -Indexes + + RewriteEngine On + #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC] + RewriteCond %{HTTP_USER_AGENT} "android" [NC] + #RewriteRule "^/(.*)" "$1/php/download_apk.php" [L,R=302] + RewriteRule ^$ %{REQUEST_URI}/php/download_apk.php [L,R=302] + + #Header set Content-Description "File Transfer" + #Header set Content-Type "application/octet-stream" + +# +# RewriteEngine On +# #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC] +# RewriteCond %{HTTP_USER_AGENT} "android" [NC] +# RewriteRule ^$ localTransfer-app.apk [L,E=stream1:1,E=stream2:1] +# +# Header set Content-Description "File Transfer" env=stream2 +# Header set Content-Type "application/octet-stream" env=stream2 +# diff --git a/index.php b/index.html similarity index 71% rename from index.php rename to index.html index 55d2255..9127b61 100644 --- a/index.php +++ b/index.html @@ -1,24 +1,10 @@ - - - + + Local Transfer @@ -50,6 +36,3 @@ else: - \ No newline at end of file diff --git a/js/imagepreview.js b/js/imagepreview.js index d3767c4..4e2217b 100644 --- a/js/imagepreview.js +++ b/js/imagepreview.js @@ -28,8 +28,9 @@ })(jQuery); function downloadThumbnail(file) { - var href = 'thumbnail.php' + var href = 'php/thumbnail.php' var blobUrl; + console.log(file); $.ajax({ url: href, diff --git a/js/script.js b/js/script.js index 7ff9f4a..34a87ed 100644 --- a/js/script.js +++ b/js/script.js @@ -60,7 +60,7 @@ $('#url').keypress(function (e) { if (e.which == 13) { var url = encodeURIComponent($('#url').val()); $.get({ - url: 'uploadUrl.php', + url: 'php/uploadUrl.php', data: 'url=' + url, beforeSend: function(){ lock = 1; @@ -76,7 +76,7 @@ $('#url').keypress(function (e) { }); function uploadFile(file) { - let url = 'upload.php' + let url = 'php/upload.php' let formData = new FormData() var title = file.name; @@ -149,7 +149,7 @@ function previewFile(file) { function listFile() { $.get({ - url: 'list.php', + url: 'php/list.php', success: function(data, statut) { $('.list').empty(); if (data.length > 0) { @@ -169,7 +169,7 @@ function listFile() { if (['file-image', 'file-video'].indexOf(value.type) > -1) a.addClass('preview'); a.appendTo('.list'); - $('.list').append('
'); + $('.list').append('
'); }); $('.preview').anarchytip(); $('.del').click( function(event){ diff --git a/localTransfer-app.apk b/localTransfer-app.apk new file mode 100644 index 0000000..9b65711 Binary files /dev/null and b/localTransfer-app.apk differ diff --git a/delete.php b/php/delete.php similarity index 100% rename from delete.php rename to php/delete.php diff --git a/php/download_apk.php b/php/download_apk.php new file mode 100644 index 0000000..05eceab --- /dev/null +++ b/php/download_apk.php @@ -0,0 +1,15 @@ + + diff --git a/fonction.php b/php/fonction.php similarity index 100% rename from fonction.php rename to php/fonction.php diff --git a/list.php b/php/list.php similarity index 100% rename from list.php rename to php/list.php diff --git a/phpinfo.php b/php/phpinfo.php similarity index 100% rename from phpinfo.php rename to php/phpinfo.php diff --git a/thumbnail.php b/php/thumbnail.php similarity index 90% rename from thumbnail.php rename to php/thumbnail.php index f38c6b0..972c116 100644 --- a/thumbnail.php +++ b/php/thumbnail.php @@ -1,8 +1,11 @@