commit
e39d84f1b2
BIN
dist/main.js
vendored
Normal file → Executable file
BIN
dist/main.js
vendored
Normal file → Executable file
Binary file not shown.
@ -278,7 +278,7 @@ final class Album {
|
||||
if (!@is_readable($photo->url)) continue;
|
||||
|
||||
// Get extension of image
|
||||
$extension = getExtension($photo->url, true);
|
||||
$extension = getExtension($photo->url, false);
|
||||
|
||||
// Set title for photo
|
||||
$zipFileName = $zipTitle . '/' . $photo->title . $extension;
|
||||
|
@ -845,7 +845,7 @@ final class Photo {
|
||||
}
|
||||
|
||||
// Get extension
|
||||
$extension = getExtension($photo->url, true);
|
||||
$extension = getExtension($photo->url, false);
|
||||
if (empty($extension)===true) {
|
||||
Log::error(Database::get(), __METHOD__, __LINE__, 'Invalid photo extension');
|
||||
return false;
|
||||
|
@ -11,6 +11,11 @@ function getExtension($filename, $isURI = false) {
|
||||
|
||||
$extension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||
|
||||
// Special cases
|
||||
// https://github.com/electerious/Lychee/issues/482
|
||||
list($extension) = explode(':', $extension, 2);
|
||||
list($extension) = explode('?', $extension, 2);
|
||||
|
||||
if (empty($extension)===false) $extension = '.' . $extension;
|
||||
|
||||
return $extension;
|
||||
|
@ -275,12 +275,6 @@ upload.start = {
|
||||
|
||||
basicModal.close()
|
||||
|
||||
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