Forum
Uploading only PDF files to bucket
Is there a way of only uploading a particular files type to a bucket?
For example: bucket="PDFs" accept="pdf"
Why? Because editors are editors.
Is there a way of only uploading a particular files type to a bucket?
For example: bucket="PDFs" accept="pdf"
Why? Because editors are editors.
Do you have
pdf
configured as a file group in yourfiletypes.ini
?No. Thanks where's the documentation on that?
..can a bucket be configured as a file group?
It's here: https://docs.grabaperch.com/docs/form/template-tags/input/file/
No, your label (e.g. 'pdf') lists acceptable file mime types.
Would that stop editors uploading an image to the (ideally) PDF only bucket?
Yes - sorry, I thought that's what you were trying to do.
If not, what are you trying to achieve?
I've got a bucket ideally of only PDF's (called 'PDFs'). But it is possible to incorrectly upload a jpeg it its place leaving a bucket of PDF's and images called 'PDFs'. This field is intended for a file (PDF) download.
Can a bucket be restricted to a filetype e.g only upload a PDF?
No, but a file upload field can be configured to only accept PDFs.