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
pitaboypitaboy 

Can a SelfServiceUser download a Document?

I'm looking for a way to allow a SelfServiceUser to download a file by clicking a simple link on a page. I've authenticated the SelfServiceUser and provided a link to the Document file
i.e. a href="https://na1.salesforce.com/servlet/servlet.FileDownload?file=015xxxxxxxxxxxx"

However, everytime the SelfServiceUser clicks the link. he's redirected to:
https://www.salesforce.com/login.jsp?startURL=%2Fservlet%2Fservlet.FileDownload%3Ffile%3D015300000003FvL&ec=302 which is the login page for salesforce.com.

Is there a way to provide a SelfServiceUser with a simple link that allows the user to download a document. I'm using API 6.0 and C#. Are there any other methods that can be used to allow a SelfServiceUser to download a document?

Message Edited by pitaboy on 08-16-2005 09:09 AM

pitaboypitaboy
I've read that you first need to query the Document object. The Document body property contains the content of the Document in base64Binary. I'm not sure how to transfer the contents of the body to the user. Is there a sample code of this process or can someone explain to me how this is suppose to be done?

Thanks in advance.
DevAngelDevAngel
Is there a session id available?  You can use frontdoor.jsp with a session id to prevent redirection to the login page.
pitaboypitaboy
Thanks, it was exactly what I was looking for and allowed Self-Service User to download Documents from SF.
ben fishin'ben fishin'

How are you authenticating the SelfServiceUser?

Thanks,

Benj