Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend modal dialog for uploading from server #894

Merged
merged 23 commits into from
Feb 16, 2021

Conversation

evoludolab
Copy link
Contributor

This pull request complements changes to the front end, see LycheeOrg/Lychee-front#245

* prepare back end for processing additional settings from modal import dialog
* log warning if deletion of original failed
* localizations limited to English
app/Actions/Photo/Create.php Outdated Show resolved Hide resolved
app/Locale/English.php Show resolved Hide resolved
* ImportPhoto::photo: new mandatory argument `import_via_symlink` before optional ones
* sanity check for incompatible settings
* Exec: eliminate `skip_duplicates` (existing `force_skip_duplicates` is enough and takes precedence)
* Create: collapse `if`s to fix smell
@codecov
Copy link

codecov bot commented Jan 29, 2021

Codecov Report

Merging #894 (54ee227) into master (eb9166f) will decrease coverage by 1.79%.
The diff coverage is 45.20%.

evoludolab and others added 7 commits January 30, 2021 10:59
* `resync_metadata` did not update keys with value null (but should have). in particular, this prevented updates to `takedate` if the corresponding entry in the DB was set to zero
* too many false positives were caused by comparing int's to their corresponding string representation.
Copy link
Contributor

@kamil4 kamil4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ready for merging.

CI fails on Docker pull?

@d7415
Copy link
Contributor

d7415 commented Feb 3, 2021

CI fails on Docker pull?

" Error response from daemon: unauthorized: authentication required"

Weird. I guess they changed something in Actions....

Copy link
Member

@ildyria ildyria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Tested. Not working when you untick the box.

@ildyria
Copy link
Member

ildyria commented Feb 7, 2021

"Status: \/var\/www\/html\/Lychee\/public\/uploads\/import\/: 0\nProblem: \/var\/www\/html\/Lychee\/public\/uploads\/import\/index.html: Unsupported file type\n{ "message": "mime_content_type(/var/www/html/Lychee/public/uploads/big/24110a44d7e54aff418e54d0cd976d49.jpg): failed to open stream: No such file or directory", "exception": "ErrorException", "file": "/var/www/html/Lychee/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/Native.php", "line": 181, "trace": [ { "function": "handleError", "class": "Illuminate\\Foundation\\Bootstrap\\HandleExceptions", "type": "->" }, { "file": "/var/www/html/Lychee/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/Native.php", "line": 181, "function": "mime_content_type" }, { "file": "/var/www/html/Lychee/vendor/lychee-org/php-exif/lib/PHPExif/Reader/Reader.php", "line": 108, "function": "getExifFromFile", "class": "PHPExif\\Adapter\\Native", "type": "->" }, { "file": "/var/www/html/Lychee/app/Metadata/Extractor.php", "line": 125, "function": "read", "class": "PHPExif\\Reader\\Reader", "type": "->" }, { "file": "/var/www/html/Lychee/app/Actions/Photo/Extensions/Metadata.php", "line": 23, "function": "extract", "class": "App\\Metadata\\Extractor", "type": "->" }, { "file": "/var/www/html/Lychee/app/Actions/Photo/Strategies/StrategyPhotoBase.php", "line": 56, "function": "getFileMetadata", "class": "App\\Actions\\Photo\\Strategies\\StrategyPhotoBase", "type": "->" }, { "file": "/var/www/html/Lychee/app/Actions/Photo/Strategies/StrategyPhotoBase.php", "line": 23, "function": "getMetadata", "class": "App\\Actions\\Photo\\Strategies\\StrategyPhotoBase", "type": "->" }, { "file": "/var/www/html/Lychee/app/Actions/Photo/Create.php", "line": 114, "function": "loadMetadata", "class": "App\\Actions\\Photo\\Strategies\\StrategyPhotoBase", "type": "->" }, { "file": "/var/www/html/Lychee/app/Actions/Import/Extensions/ImportPhoto.php", "line": 43, "function": "add", "class": "App\\Actions\\Photo\\Create", "type": "->" }, { "file": "/var/www/html/Lychee/app/Actions/Import/Exec.php", "line": 218, "function": "photo", "class": "App\\Actions\\Import\\Exec", "type": "->" }, { "file": "/var/www/html/Lychee/app/Actions/Import/FromServer.php", "line": 73, "function": "do", "class": "App\\Actions\\Import\\Exec", "type": "->" }, { "file": "/var/www/html/Lychee/vendor/symfony/http-foundation/StreamedResponse.php", "line": 109, "function": "App\\Actions\\Import\\{closure}", "class": "App\\Actions\\Import\\FromServer", "type": "->" }, { "file": "/var/www/html/Lychee/vendor/symfony/http-foundation/Response.php", "line": 394, "function": "sendContent", "class": "Symfony\\Component\\HttpFoundation\\StreamedResponse", "type": "->" }, { "file": "/var/www/html/Lychee/vendor/laravel/framework/src/Illuminate/Support/HigherOrderTapProxy.php", "line": 34, "function": "send", "class": "Symfony\\Component\\HttpFoundation\\Response", "type": "->" }, { "file": "/var/www/html/Lychee/public/index.php", "line": 75, "
function": "__call", "class": "Illuminate\\Support\\HigherOrderTapProxy", "type": "->" } ] }

🤔

Copy link
Member

@ildyria ildyria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comment. Or this will crash (422) when the box is not ticked.

@ildyria
Copy link
Member

ildyria commented Feb 7, 2021

LGTM

@kamil4 kamil4 mentioned this pull request Feb 7, 2021
@sonarcloud
Copy link

sonarcloud bot commented Feb 16, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants