0

We've got some files stored as documents, which apparently predate notes and attachments, or were used in parallel to them. I'm trying to allow a download of this from a LWC. I've tried like every permutation of the servlet URL and I can't find one that results in a download. Just keep getting invalid page. I've given read access to the document object on the profile.

Here's what I've tried

/communityName/servlet/servlet.FileDownload?file=documentid
/communityName/s/servlet/servlet.FileDownload?file=documentid
/communityName/sfc/servlet/servlet.FileDownload?file=documentid
/communityName/sfsites/servlet/servlet.FileDownload?file=documentid

Anyone run into this kind of thing before? Do I need to upload these as contentDocuments? There's thousands and I'd prefer not to.

1

1 Answer 1

0

Raul's comment below was helpful, but I ended up going a different route. Not exactly a solution, but with the time it'll buy I can convert these to files and use the URL class Raul suggested.

I just linked directly to the existing visualforce community, since it was able to serve up documents. ie. visualforcecommunityurl/documentId.

You must log in to answer this question.

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