Duplicate You do not have permission to view new attachment in preview

AndyB

Well-known member
When I Upload a File (an image) and insert the image, I cannot preview the image. Steps to reproduce:

1) Go to a thread
2) In the quick reply, Upload a File (an image)
3) Insert full image
4) Click More Options...
5) Click Preview...
6) Click View attachment 50281

The error is:

You do not have permission to view this page or perform this action.
 
@Mike may correct me if I'm wrong, but I believe this behaviour is to be expected.

When you preview, it just runs the editor contents through the BB code parser, and renders that as a preview. Of course where it fails to be an accurate preview is a) it doesn't display the thumbnail (just the text) and b) this error.

This error is to be expected because to view an attachment which has not yet been associated to an item of content you need to supply the temp hash parameter.

The solution would be to do more than just parse the BB code in the editor. So, actually render the thumbnail, and/or actually append the temp_hash parameter to the URL so that the attachment will load. If the behaviour is as designed this is probably more of a suggestion.

EDIT: Yep: http://xenforo.com/community/threads/attached-images-preview-permission.50518/#post-539936
 
Top Bottom