Skip to content

jpg files cannot be marked as favorites #41418

@cortho

Description

@cortho

Steps to reproduce

  1. Click the star icon next to a file to have it added to favorites
  2. The HTTP POST request to https://mycloud.example.com/apps/files/api/v1/files/testfile.jpg with payload {"tags":["_$!<Favorite>!$_"]} results in 405 Method not allowed.

Expected behaviour

File should be added as favorite.

Actual behaviour

HTTP Error 405 prevents file from being added.

Assumed bug

When running occ:maintenance update:htaccess additional rules are added in method updateHtaccess in

$content .= "\n RewriteCond %{REQUEST_URI} !\\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg|json|properties)$";
, for file types .(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg|json|properties) which seems to prevent the adding as favorite.

Edit: So in fact this bug affects all those file types.

When i remove the image file types from the list adding as favorite is possible, but then there are display issues with file/folder icons and previews, so it cannot be used as workaround.

It should either be documented, that files with the above extenstions cannot be added as favorites or a solution has to be found.

Server configuration

(added though not relevant)

Web server:
apache 2.4.56

Database:
mariadb 11-4

PHP version:
7.4

ownCloud version: (see ownCloud admin page)
10.15.3

Updated from an older ownCloud or fresh install:
updated from older

Where did you install ownCloud from:
original ownCloud download server

Signing status (ownCloud 9.0 and above):
No issues

Configs not added because of no relevance

Are you using external storage, if yes which one: local/smb/sftp/...
no

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
any browser

Operating system:
any operating system

Logs

Web server error log

ownCloud log (data/owncloud.log)

no log, even at loglevel 0

Browser log

POST https://mycloud.example.com/apps/files/api/v1/files/testfile.jpg with payload {"tags":["_$!<Favorite>!$_"]} results in 405 Method not allowed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions