The issue is caused because you are not trying to upload or download a file with in a form element. Now, the form element comes into picture when we include a container(inside a harness). This could be happening because you have used a ScreenLayout or Panel Set where a direct section is included with in it containing the attachment section. So these Panel Set or ScreenLayout doesnot contain a form element and hence the error is thrown.
Hence we suggest you to include a container and include a Dynamic Layout(possibly a column layout) which would also partition the screen in case you wish to display the attachments in left or right side of the screen.