Rebuild and code adjustments #490
This commit is contained in:
parent
f7b294e358
commit
f1d6baff6c
BIN
dist/main.js
vendored
Normal file → Executable file
BIN
dist/main.js
vendored
Normal file → Executable file
Binary file not shown.
BIN
dist/view.js
vendored
BIN
dist/view.js
vendored
Binary file not shown.
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user