Rebuild and code adjustments #490

This commit is contained in:
Tobias Reich 2016-03-18 22:09:54 +01:00
parent f7b294e358
commit f1d6baff6c
4 changed files with 4 additions and 12 deletions

BIN
dist/main.js vendored Normal file → Executable file

Binary file not shown.

BIN
dist/view.js vendored

Binary file not shown.

View File

@ -6,13 +6,14 @@
*/
function getExtension($filename, $isURI = false) {
# If $filename is an URI, get only the path component
// If $filename is an URI, get only the path component
if ($isURI===true) $filename = parse_url($filename, PHP_URL_PATH);
$extension = pathinfo($filename, PATHINFO_EXTENSION);
# Special cases
if (strpos($extension, ':')!==false) list($extension, ) = explode(':', $extension, 2);
// Special cases
// https://github.com/electerious/Lychee/issues/482
list($extension) = explode(':', $extension, 2);
if (empty($extension)===false) $extension = '.' . $extension;

View File

@ -275,15 +275,6 @@ upload.start = {
basicModal.close()
/*
// Only check for file validity on PHP side
let extension = data.link.split('.').pop()
if (extension!=='jpeg' && extension!=='jpg' && extension!=='png' && extension!=='gif' && extension!=='webp') {
loadingBar.show('error', 'File format of link not supported.')
return false
}
*/
files[0] = {
name : data.link,
supported : true