Repository navigation
Do not load previews for unsupported mimes - #27558
Conversation
|
I'd skip loading unsupported previews completely but I haven't found a way to grab all available mimetypes at once yet :/ another option is to extend DAV response with But Trashbin is still using old non-dav endpoint (what about other apps(?)) cc @PVince81 |
|
I think just returning 204 should be enough. Now I wonder if mobile clients might break with this... @davivel If yes, then let's add a special header or query param that only the web UI gives to get that 204 response. |
|
ok, reverting my local miserable attempts to pass supported mimes via |
|
404 is the status if a resource is not found. This is the correct behaviour in this case. 👎 |
|
In this case the only solution I can think of is to pass the list of supported previews through config.php or other means (like the mimetype JS thing) and prevent the client to request the preview URLs when it is known to not have previews. That or send back the icon instead of a preview. But this could break the expectation of mobile client. |
👍 this is the way it is already supposed to work |
|
@DeepDiver1975 it doesn't, because the web UI currently has no idea what preview types are supported. There used to be an attribute Well, we could maybe add that attribute in Webdav and call it "oc:preview-url". If set, the web UI uses it to fetch the preview. If not set, fetch the icon instead. |
f5383ee to
9e9c3e9
Compare
|
@DeepDiver1975 @PVince81 oook... Finally I've found how to make this lazy-registered stuff less lazy. |
|
Tested, works. However you need to revert the error code to 404. |
9e9c3e9 to
c6d6fca
Compare
|
@PVince81 reverted |
|
👍 Let's hope you don't need to massage Jenkins again |
c6d6fca to
45aef4d
Compare
|
@PVince81 Tests passed |
|
@VicDeo @PVince81 @DeepDiver1975 Excellent work! 👍 |
|
Regression #27932 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
- As suggested, set response to 204 instead of 404 if there is no previewoc_appconfig.core.enabledPreviewProvidersand test mime against this list on js side.Related Issue
Fixes #24216
Motivation and Context
#24216 (comment)
Types of changes