1

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.

0

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:

https://naXX.force.com/sfc/servlet.shepherd/document/download/069R00000007YRFIA2?operationContext=S1

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.

3
  • I'm looking to be able to download the file which is from a custom object and uploaded via the "Notes &Attachments" object. – deep Mar 2 '17 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. Mar 2 '17 at 20:18
  • i get the following error top.location='/ex/errorduringprocessing.jsp' – deep Mar 3 '17 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.