Uploading Just One file type (allowpdf)

Modified on Thu, Oct 12, 2023 at 1:45 PM

In order to allow a user to just be able to upload anyfile type they want in blocks whether jpeg,png or pdf do the following.

To Allow both Image and PDF upload

1. Create an Image block

2. Add status command with allowpdf as value

3. Standard upload only, Slim not supported.


This will allow the pdf to be uploaded or selected.

In order to use these file types 2 new Blocks must be used.


The PDF block would have this rule with the filename function:

!!if substring("{Image}", string-length("{Image}") - 3,4)=".pdf"%%{Image}%%!!


The Image Block would use the the filename function with the below value:

!!if substring("{Image}", string-length("{Image}") - 3,4)!=".pdf"%%{Image}%%!!


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article