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

Add document restriction for attachment #349

Open
Olivier127 opened this issue Feb 17, 2023 · 3 comments
Open

Add document restriction for attachment #349

Olivier127 opened this issue Feb 17, 2023 · 3 comments

Comments

@Olivier127
Copy link

Q A
Bug? no
New Feature? yes
Bundle Version Specific version or SHA of a commit
Sulu Version Specific version or SHA of a commit
Browser Version Browser name and version

Actual Behavior

When you want to restrict the type of attachment field, you can only restrict it to image, sound and video.

Expected Behavior

Restrict to PDF document for example.

@matthiasseghers
Copy link

Also interested in having this feature.

@creatiombe
Copy link

I made a job application attachment field, you can just make a extra field type and there you can define the extra mime types

But i agree, simple things like zip, pdf and word should be allowed

@alexander-schranz
Copy link
Member

But i agree, simple things like zip, pdf and word should be allowed

They are allowed if you don't restrict them. If you select none for the restriction file types they are allowed to upload zip, pdf, ... or whatever they want.

Restricting is currently done based on the mime types filters va audio/*, video/*, image/*, ... same as Sulu media types work. There is no specific group yet for zip or pdf as they are just a general application/... mime types.

Still Symfony from system is easy to extend via a Form Extension it is even possible to add all kind of constraints you want to a project.

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

3 participants