PR #5912 introduced the Terms and Conditions feature, consisting in the upload of a customizable .PDF file in the backoffice, which in turn appears to the customer - as a link to a new tab, on the checkout page.
This bug reports the behavior and errors caused when another file type - other than .PDF - is uploaded in the back office. After the above mentioned PR, uploading other file types is possible, although an error message is displayed. After upload, clicking on the file link, visible on "Business Details" section generates a snail.
This bug only concerns the backoffice.
As admin, in the Backoffice



Bugsnag
https://openfoodnetwork.slack.com/archives/CEF14NU3V/p1599742532044400
Uploading .pdf files only.
bug-s3: a feature is broken but there is a workaround
I think we could copy what GH does for attachments. Refuse to store the file as soon as we notice it's not a PDF plus the error message. Likewise, we could also add a side note next to the button specifying only PDF is allowed (unless we do already).
Filipe, I think this is now improved from https://github.com/openfoodfoundation/openfoodnetwork/pull/6099#issuecomment-717589579
The file input is now filtered by default on pdf files. To upload a txt file you need to change the filter manually to list other file types other than PDF. Maybe this is now an S4.
Makes sense, I agree with downgrading :+1:
Do you think it's a good first issue?
I'll move it to "All the things" for now.
I think it is. For some reason, the form is still listing the file which didn't get persisted due to the model validation.