function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
yogesh goadyogesh goad 

Problems in displaying pdf Attachment file on a visual force page

I am able to upload and retrieve the attachments to my custom object in a table.
clicking on the attachment id takes me to the page in the below image.User-added image

The problem is with the "Viewfile" link on this page. it downloads the uploaded file without extension instead of displaying it in  browser.
Is there a problem with my browser or its a problem with salesforce.

This same link works fine with Documents but size constraint does'nt allow to upload files larger than 5 mb with Document.
AshlekhAshlekh
Hi,

It is a browser setting as far I guess becasue some time file will open in browser and not downloaded some time vice versa happen.

Still salesforce has increased the limit size of file 5 to 25 MB but may be some instance are not updated.
yogesh goadyogesh goad
Hi ashlekh

Thanks for the reply . The "viewfile" link with which i have problems was working previously for other users . i was suggested to use the above link to display pdf on the browser by previos users. here is something which i came through searching for a solution to my problem and the pictures show it worked fine for him.

http://salesforce.stackexchange.com/questions/28268/rendering-attachment-on-visualforce-page