I have a custom angular2 (not using visualforce/apex) application which I need in which only community users are able to login to. (Customer Community License).

However, the following URL redirects me to the salesforce login page

<a href="https://ca.naXX.content.force.com/servlet.FileDownload?file=XXXXXXX}" download>

Is there a specific permission I need to enable to allow community user to download files using that URL? The download file is from Notes & Attachments section from a custom object.

2 Answers 2


Can you please try this approach to get a download URL:

  1. Upload a non-image file to some feed within the community (I used a pdf)
  2. From the feed, click the thumbnail for the file which should open the preview
  3. From the preview, click the download icon in the top right
  4. After it's downloaded, view the download history (I used chrome). The download history will display the download URL. It will be too long to display, but right click on the partial URL shown and say inspect and you can see the whole URL.

For what I saw, the URL is of the format:


I tried as a non-community user, and I would expect the url is the same for a community user, but doing the steps above as a community user should confirm.

  • I'm looking to be able to download the file which is from a custom object and uploaded via the "Notes &Attachments" object.
    – deep
    Commented Mar 2, 2017 at 0:49
  • Were my steps clear enough help you obtain a download URL? I think the download URL will be the same, but you could also compare the URLs.
    – Neil H.
    Commented Mar 2, 2017 at 20:18
  • i get the following error top.location='/ex/errorduringprocessing.jsp'
    – deep
    Commented Mar 3, 2017 at 21:55

If your user is logged in, he should has session Id. Try to append param to the your url

<a href="https://ca.naXX.content.force.com/servlet.FileDownload?file=XXXXXXX&sid=YYYYYYYY}"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .