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

Duplicate asset handling interface shows when uploading unknown filetype #10980

Closed
daun opened this issue Oct 20, 2024 · 2 comments · Fixed by #10986
Closed

Duplicate asset handling interface shows when uploading unknown filetype #10980

daun opened this issue Oct 20, 2024 · 2 comments · Fixed by #10986
Labels

Comments

@daun
Copy link
Contributor

daun commented Oct 20, 2024

Bug description

The new logic for handling duplicate assets is quite amazing!

I just noticed that the new "Fix..." UI will also show up when uploading assets with unknown file extensions. In that case, the suggested solutions of appending the timestamp or renaming the file won't do anything to fix the situation. So it's a bit misleading...

I'd suggest only showing the new UI for actual filename conflicts, not on all 422 responses which might also include other validation errors like the mentioned file extension mismatch. Not sure how to determine if a 422 is a rename conflict or another validation issue, though.

Screenshot 2024-10-21 at 01 25 54

How to reproduce

  • Upload unknown filetype (e.g. epub)
  • See that a "Fix" button shows up on the right of the error message

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 10.48.22
PHP Version: 8.3.3
Composer Version: 2.5.1
Environment: local
Debug Mode: ENABLED
URL: statamic.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 4
Sites: 2 (DE, EN)
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.x-dev Solo

Statamic Addons
statamic/eloquent-driver: 4.15.2

Statamic Eloquent Driver
Asset Containers: eloquent
Assets: eloquent
Blueprints: file
Collection Trees: file
Collections: file
Entries: file
Forms: file
Global Sets: file
Global Variables: file
Navigation Trees: file
Navigations: file
Revisions: file
Sites: file
Taxonomies: file
Terms: file
Tokens: file

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@daun
Copy link
Contributor Author

daun commented Oct 21, 2024

I guess the error message could be improved in any case — "filetype .epub not allowed" or something.

@jasonvarga
Copy link
Member

Good catch. 🙃

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

Successfully merging a pull request may close this issue.

3 participants