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

Can't upload M4V files when "*video*" mimetype is added #368

Open
BeckyLiu opened this issue May 24, 2023 · 8 comments
Open

Can't upload M4V files when "*video*" mimetype is added #368

BeckyLiu opened this issue May 24, 2023 · 8 comments

Comments

@BeckyLiu
Copy link

BeckyLiu commented May 24, 2023

Steps to reproduce

1.configure file access control flow in administrator page, and add operation block access if " file MIMETYPE does not match '*video*'"
image
2.upload demo.m4v file
image

Expected behaviour

The upload should success

Actual behaviour

The upload failed with 403 "Access denied"

Notes:

  1. mp4 files can be uploaded and after removing the access control workflow, upload m4v file succeeded.
  2. Nextcloud and all apps are updated to latest version.
@nickvergessen
Copy link
Member

Try .*video.*
The required rule syntax is regex

@BeckyLiu
Copy link
Author

BeckyLiu commented May 24, 2023

.*video.* gives error as below:
image

@nickvergessen
Copy link
Member

Hmm the placeholder is not updating correctly, for the regex we also need the slashes, so this should work:
/.*video.*/i

@BeckyLiu
Copy link
Author

BeckyLiu commented May 25, 2023

Hmm the placeholder is not updating correctly, for the regex we also need the slashes, so this should work: /.*video.*/i

/.*video.*/i can be saved, but still got 'access denied' when uploading m4v files :(

@nickvergessen
Copy link
Member

Do the same for audio and zip?

@BeckyLiu
Copy link
Author

audio files, mp4 and zip files can all be uploaded successfully.

@nickvergessen
Copy link
Member

m4v maps to video/mp4 so that should work:
https://github.com/nextcloud/server/blob/ffa7b37d5079dc29ae1ed622c573a3863d118518/resources/config/mimetypemapping.dist.json#L106

Can you make a final screenshot of your settings?

@BeckyLiu
Copy link
Author

BeckyLiu commented Jun 1, 2023

m4v maps to video/mp4 so that should work: https://github.com/nextcloud/server/blob/ffa7b37d5079dc29ae1ed622c573a3863d118518/resources/config/mimetypemapping.dist.json#L106

Can you make a final screenshot of your settings?

yes, i checked the mimetype. it should work. but it does not. mp4 files can be uploaded, but not m4v files.
Configure
image

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

No branches or pull requests

2 participants