Questions tagged [files]

The tag has no usage guidance.

117 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
174 views

How can I make file public in Salesforce to fix a sharing error?

When I try to share a file in Salesforce, I get the error that The maximum number of times this file can be shared has been exceeded Which means it is shared > 100 times. The documentation ...
5
votes
0answers
793 views

Files: Why ContentVersion /sfc/servlet.shepherd/document/download/ sometimes sets Content-Disposition=attachment and sometimes =inline

I need to view and PDF file stored as an attachment inside an IFRAME in this context: Visualforce: Why the display of an PDF-File inside an IFRAME works on a Sandbox but not in Production? Inspecting ...
5
votes
1answer
166 views

Salesforce File Sync - How do I set Sync status in Apex?

As above, I'd like to set the Sync status on new Files programmatically - does anyone know if it's possible and if so how? When new File records are created, they are set to un-synced mode, meaning ...
5
votes
1answer
565 views

How to save large files in Salesforce with synchronous Apex?

I've created a Visualforce page that allows users to drag and drop files and have them uploaded to Salesforce and then displayed in a list immediately. To do so, my VF page sends the file in chunks ...
4
votes
0answers
331 views

How can you insert a Salesforce File with Collaborator ShareType?

I am currently trying to insert a Salesforce File attached to a custom Invoice object with the Collaborator (C) permission, as described on the Salesforce Documentation. The code was originally set ...
4
votes
0answers
456 views

USING SCOPE Everything not working

I wrote a trigger on ContentDocumentlink to get a count of number of files uploaded against Service_Request__c (Custom Object) record.It works fine for new files are uploaded on Service Request record....
3
votes
0answers
83 views

Trying to save image from Twilio MMS to Files?

I've built an SMS/MMS Lightning Component, which displays incoming MMS images in a thumbnail, and if you click it, a full-size modal display. Now I want to add the option to Save to Files... For the ...
3
votes
0answers
3k views

Using Lightning input file

I've been using the lightning:input type="file" <lightning:input type="file" label="Attachment" name="file" multiple="true" accept=".docx, .doc, .xlsx, .zip" onchange="{! c.handleFilesChange }"/&...
3
votes
2answers
701 views

Get the image in file - lightning experience

I have to display an image in a lightning component. So in Salesforce classic I put this image in an attachment related to an object, but in lightning experience there is no attachment, or I didn't ...
3
votes
0answers
348 views

The user keep geting invalid session when trying to upload files

We enabled option on Salesforce Files Setting: Files uploaded to the Attachments related list on records are uploaded as Salesforce Files, not as attachments . After that, user keep getting ...
3
votes
0answers
260 views

Rolling Back Enhanced Notes and Notes Reporting

My client has enabled Enhanced Notes in their org, but are now experiencing all the reporting limitations associated with new feature. They want to pull reports with actual text entered in note, but ...
3
votes
0answers
527 views

How do I open & save a .ics calendar file from Salesforce via email directly to Outlook (or others)?

I have an HTML email that I need to send to contacts with an option to book a calendar event directly from the email. I created the event in Outlook, saved it as a .ics file which I then uploaded into ...
2
votes
1answer
12 views

Where are files shared with a public link stored?

In the org I am working on, we have a bunch of files attached to a custom object that represents a PDF report of the contents of that file. When the files are attached, we have some automation that ...
2
votes
0answers
160 views

Lightning Web Components file preview does not work on mobile version

I created a component in LWC which uses standard Salesforce file preview. It is perfectly working on desktop but nothing happens when I press file name on mobile version. My html code is below: &...
2
votes
0answers
60 views

How can I allow the user to Populate Custom Fields When Uploading Files?

Update: I managed to get the dialog to display but the implementation feels like a bug workaround. See update below. How can I get this Add File Details dialog to display allowing the user to add ...
2
votes
0answers
274 views

Generate PDF preview from APEX class

What I'm doing is retrieving a PDF and save that PDF into the notes & attachment of my current object. Everything works fine, I'm able to get the base 64 encoding of the PDF, convert it and save ...
2
votes
0answers
256 views

Files not attached when forwarding emails (Classic)

In classic when you forward an email containing attachments, they are automatically included on the email; you see them below the email editor in the Attachments section. This is not the case for ...
2
votes
0answers
30 views

Dropbox File Management Alternative for Salesforce

Trying to find an external file management app like Dropbox which is integrated with Salesforce. Unfortunately, Dropbox for Salesforce has some really bad reviews in Appexchange(2.7 rating :-( ). What ...
2
votes
1answer
43 views

Lightning Files Unencrypted Preview Link

Back in Classic we can preview a PDF attachment by plugging in its ID into this URL: https://DOMAIN.content.force.com/servlet/servlet.FileDownload?file=00PFILEID Anyone know of a way to do this ...
2
votes
0answers
206 views

Print all iframes in Lightning Component

We display vf pages rendered as pdfs in a lightning component which generates these documents. We would like to implement a print all button that would print the contents of all the iframes. I have ...
2
votes
1answer
134 views

Manage permissions on chatter files from apex

We need to manage access to files from within apex code (triggers mostly). In general, we need to allow only specific users (not profiles) read access on a per-file basis. As in, on our page a user (...
2
votes
0answers
441 views

ContentDocumentLink - Can't set Visibility:InternalUsers when linking to case in specific sandbox

I have to push about 40,000 files into Salesforce as case files for a go live cutover. I have a process which creates a ContentVersion and then a ContentDocumentLink. In one sandbox, the files are ...
2
votes
0answers
1k views

How to create an Archive/Zip file with APEX

I want to create an archive/zip file with APEX, my requirement is to extract all the documents related to an account and archive it as a zip file. Files could be images, text word or CVS etc. I ...
1
vote
1answer
35 views

PDF file is getting corrupted when sending by HTTP callout to external system

on file upload below function is called in LWC. LWC Function uploadHelper() { this.file = this.filesUploaded[0]; this.fileReader = new FileReader(); this.fileReader.onloadend = (() =&...
1
vote
0answers
34 views

How to use a Data Extract to send tracking activity to an SFTP

I am trying to set up my first data extract activity, and I'm having a lot of trouble with the basic setup because I don't truly understand what the activities do. I'm trying to do a tracking export ...
1
vote
0answers
96 views

ContentVersion file not viewable to Guest Site User

I have Salesforce Files associated with a Contact that I'd like to pluck out the ContentVersion Id in order to display the image on a public-facing Visualforce page (via Sites): <!-- This is ...
1
vote
0answers
50 views

Can Community Guest users delete the owned file?

Much appreciate if anyone can help me with the below. I have a community where guest users update some information and upload files with a flow. In the flow, users can delete files they uploaded once ...
1
vote
0answers
106 views

Display a PDF in Salesforce from Blob data

For our project, we need to get a PDF via API from an external private filestore, and display it within a Lightning Component. With the blob that is returned, if I set that to the src of an iFrame, it ...
1
vote
0answers
90 views

Unable to captureStream from a video element with salesforce content as the video source

We're looking to stream content in a HTML tag through a video chat service, TokBox. This content is currently housed in Salesforce Files, and we're trying to access this content via the "...
1
vote
0answers
154 views

Cannot preview PDF publicly shared file

I have a couple of PDF files that have public links that are no longer showing a file preview.  Any thoughts why or what I can do to fix this problem.  I have refreshed the preview link & also re-...
1
vote
0answers
19 views

Need clarification for the Copy sharing mode of Files Connect

We want to connect Google Drive as a Connected Source. We want also share files with external users. That's why Reference sharing mode is not an option in our case. While reading the documentation: ...
1
vote
0answers
32 views

Share files publicly via Saleforce Files

BACKGROUND We are now deciding if storing files inside Salesforce would give us any benefit comparing to 3rd party providers. The main requirements are (1) allow big files (up to 1 GB); (2) Allow for ...
1
vote
0answers
46 views

How do I add a picture to a Contact record from File upload

I would like to add a picture to a Contact by uploading it to the Files related list and have the file picked up automatically, i.e. if we use the same file name for each Contact, "ContactPhoto.jpg." ...
1
vote
0answers
35 views

How to add a custom pop up on click of 'Add Files' and 'Upload ' button on standard Files Related list on Salesforce Objects

Below is the detailed requirement- As a user I want to be able to add attachments to objects in Salesforce that have attachments enabled. Due to legal requirements the user has to confirm that he ...
1
vote
0answers
22 views

Best possible approach(inbuilt sf method, iframe, 3rdpart js libs) to display pdfs for ipads using Visualforce

We have scenario where visualforce pages need to display pdfs in ipad browsers. We were able to display attachments but not files. Is there a way/solution to display pdfs in ipads that works with ...
1
vote
0answers
67 views

Querying Files in Apex, Classic vs Lightning

I have a Site User who accesses records through a VF page. I am encountering a strange problem where, Files uploaded in Lightning is visible but not the files those were uploaded in Classic. When ...
1
vote
0answers
60 views

Can I push a file (ContentDocument) out from Salesforce to a File Repository?

Does Salesforce support capability to push out a File (not attachment) from SF onto a REST endpoint?
1
vote
0answers
126 views

Reference Salesforce “Files” in formula fields and emails

We all love Static Resource, but there is huge limitation - the file size cannot be more than 5mb. For most JS files, it is OK, but not so good if you are storing images, even when you zip them up. ...
1
vote
0answers
168 views

Some ContentDocument is not returned by the query

I am facing a weird problem on the Files. Am trying to get all the ContentDocuments shared with "Any user in your company" with "Viewers" permission and change the access to "No Access". If we ...
1
vote
0answers
171 views

Salesforce files unable to access document with partner user

We have the following scenario: - Partner user as access to Campaign record - An internal user add a File related to this Campaign Record Partner user is not able to access the content document, and ...
1
vote
0answers
344 views

Attach File/ContentVersion into a standard visualforce email template

I have an api that gets pdf invoices and stores them as Salesforce Files. I then want the sales rep to be able to send the email template with the pdf attached. Using standard visualforce email ...
1
vote
0answers
79 views

Return all documents for record on public site

I have a public site where I pass a record id via URL parameter. I show the related list of the files. I can do this when I preview the site from the developer console. But when I do this from the "...
1
vote
0answers
362 views

Cannot Query ContentDocumentLink as a Portal user

I have a situation where I am trying to retrieve documents which were generated by DrawLoop and added to SFDC as Files. As the System Admin user, I can query for this data using the following query: ...
1
vote
0answers
172 views

How we can upload documents Into a Salesforce CRM Content Personal Library using .net API?

We are using trail account of sales force developer edition . We are trying to upload attachments into sales force account using REST API , In this scenario we can upload attachments into different ...
1
vote
1answer
434 views

How do I find/delete old knowledge article file attachments?

We have knowledge articles that contain attachments (e.g. PDFs). Over time, we'll update the article and replace the attachment with a newer version. It appears that old links to older attachments ...
1
vote
1answer
379 views

Retrieve ParentID on insert of file

How to retrieve AccountId on insert of file. system.debug('LinkedEntityId $$$$'+LinkedEntityId) always gives OwnerId. But after insert of file, I can retrieve two rows from below query on ...
1
vote
2answers
494 views

What is the best way to hyperlink to files. such as .pdf files, when using community builder?

We are converting our agency's public website over to a community site using the Napili template, but I am struggling to make files available. Our old website has literally hundres of .pdf files that ...
1
vote
0answers
110 views

Access all files using SF1 and Lightning

I am trying to create a file upload component which can upload a file (type pdf / doc / docx etc) from my mobile SF1 app. I am using - <input type="file" class="file" aura:id="file" /><br/&...
1
vote
0answers
70 views

Accessing “Salesforce Files Settings” in Apex

Is it possible to see in Apex if an org has the following setting enabled? Files uploaded to the Attachments related list on records are uploaded as Salesforce Files, not as attachments It doesn'...
1
vote
2answers
1k views

How to attach file to Feed Item in SOAP API v36

Can someone give me an example of how to attach a file to Lead using FeedItem in SOAP for version 36 since ContentData and ContentFileName fields are obsolete? My previous code was FeedItem post = ...