Questions tagged [files]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
280 views

Image dimensions validation with Lightning FileUpload component

We need to give an ability to user to upload an image related to Account in a Lightning Component. This can be easily done with standard lightning:fileUpload component without any need to send file ...
1
vote
0answers
34 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 ...
0
votes
0answers
318 views

Is downloading multiple files officially supported by Salesforce in lightning?

The url "hack" to use /sfc/servlet.shepherd/version/download/ has been documented in a salesforce blog about visualforce pages showing images, however I can't find anywhere where this is officially ...
1
vote
1answer
26 views

Getting info on files that were shared between dates [closed]

I'm fairly new to Salesforce API, I'm trying to get information on files that were shared between dates. I would like to know how to retrieve this info using REST API. Is it even possible to query ...
2
votes
1answer
48 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 ...
1
vote
0answers
53 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." ...
2
votes
0answers
251 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 ...
1
vote
1answer
273 views

External user upload file

We're trying to allow Customer Community Users to upload files using our portal. When I try to use the REST API to upload a file I get a 403 Forbidden response. The response body has message":"API is ...
1
vote
0answers
48 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 ...
2
votes
1answer
219 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 (...
0
votes
1answer
145 views

Test Class for Attachments to Files on Task

I have written a basic trigger which converts all the attachments as files on the task object. I am having difficulties to achieve the test class and below it is. My test class is compiling but not ...
0
votes
1answer
43 views

How can I restrict the upload on Files based on Record Type?

I have a Contact Object with two record types (Client & Intake). I am enabling the "Files" related list to both page layouts, however, I only want the Intake record type to have the "Upload Files"...
4
votes
1answer
473 views

Generate a Public Accessible link from ContentDocument

My Client wants to upload Image files from Account and generate a link for this image file and save it in a custom field on Account. This link should be Public Accessible (access from outside without ...
4
votes
0answers
388 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 ...
0
votes
1answer
107 views

Why deploy.zip file does not deploy metadata when archived using java.utils.zip?

I have created deploy folder with all correct metadata definitions. If I compress the folder using java program and try to deploy it using DeploySample java code, get success in console but no ...
0
votes
0answers
32 views

Related List Files vs Notes & Attachments [duplicate]

users want me to add a related list to a custom object to allow you to add attachments. What is the difference between the "Files" and "Notes & Attachments" related list?
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 ...
4
votes
1answer
99 views

Getting ContentType for ContentDocuments?

The ContentDocument and the ContentDocumentVersion do not store a ContentType (MIME) like attachments did. I am trying to pass documents using an API and this information is needed to properly pass ...
2
votes
1answer
29 views

OpenFile command in Portal Not Working Same after Summer '18 upgrade

I have links in my community portal that launch files. Since this weekend's upgrade to Summer '18 the files do not automatically launch. Instead, users are taken to a file details page where there ...
3
votes
1answer
41 views

Using Apex or API, how to determine who has access to a Document Folder?

In Salesforce UI, I can assign access to Document Folders. How can I determine who has access to a Document Folder with Apex or API? I thought I would find an object like "FolderMember" or similar, ...
1
vote
0answers
37 views

Salesforce integration with sharepoint [closed]

A user has shared the (older version) file reference to another user, is there a way to redirect the user to the latest version of the file shared.
0
votes
1answer
328 views

Salesforce Files download from VF [closed]

Anyone have an example of how to download Salesforce Files from a VF page? From a custom Contact page detail, I want a button to open a VF page interface to allow a user to select Salesforce Files ...
0
votes
1answer
161 views

visualforce page to download “Salesforce Files” [closed]

I've been asked to create a button on a Related List for Salesforce Files in Classic. So the Related List is on the detail page for a custom Contact page. I'm guessing I'll need to create a VF page ...
1
vote
0answers
69 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 ...
0
votes
1answer
1k views

Upload file in Salesforce File object using rest

I am trying to understand if I can upload a user profile picture in Salesforce using Rest. I have performed the following : Uploaded a file in Salesforce. Then I used the file Id to upload it into ...
2
votes
0answers
604 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 ...
0
votes
1answer
639 views

How to attach a file in the “Files” related list instead of the “Notes & Attachments” related list of a record [duplicate]

I'm new with Apex. I'm downloading images from web with Apex that i'd like to add in Files. Already i'm just adding images to Attachment. //Download image Http h = new Http(); HttpRequest req = new ...
2
votes
1answer
646 views

Select From Existing Files in Custom Lightning Component

I am wanted to have the option to select from files which have already been uploaded in Salesforce in a custom lightning component. I would like to build something similar to what is on the Files ...
0
votes
1answer
242 views

Notes and Attachments, conversion to Files SOQL

I converted all Notes and Attachments which are associated to Case object to Files. When I run a SOQL query on ContentVersion to see all the Files, I don't see all the files. Case has Public Read/...
0
votes
1answer
35 views

How to search through text file content, if it was uploaded in Files tab?

I uploaded a docx file in Files tab in lightning experience. Now I have to use it in Apex trigger, to check if Contact's Name is mentioned in this file. I know that in Salesforce classis you could use ...
0
votes
1answer
67 views

Link a File to a related object on upload

How would I go about linking a File to a related object when attached to a record? For example, someone uploads a File to an Opportunity and I then want to automatically link that with the Contract ...
4
votes
1answer
1k views

Files with Content Delivery & Public Links as a CDN

I'm trying to figure out if there's a way that I can leverage Salesforce Files, plus the Content Delivery and Public Links feature to create sort of a poor man's CDN for serving up images to a ...
-4
votes
1answer
724 views

create formula for download Attachment and File [closed]

I have a id of Attachmant OR File is stored in a variable now want to write formula to download attachment or File is it possible ?
0
votes
0answers
231 views

How to use Url.getFileFieldURL

I have created and added an attachment using apex code. Now I need to get the download link for this. So I tried Url.getFileFieldURL. I tried with both 'Body' and 'AttachmentBody' as the second ...
2
votes
1answer
525 views

Query to see all Files related to specific object (Events)

The following post talks about running a query to return Files related to a specific record: How to query all files attached to the Opportunity What I'm trying to do is return ALL files related to ...
0
votes
2answers
90 views

Unable to revise ContentDocument created in Apex

When I try to create a Content Document (File) in apex, it creates one with no facility to revise or add new version. However if I use the UI to create a file it gives me a link to add new version. ...
1
vote
0answers
61 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?
2
votes
1answer
4k views

How do I create a new ContentDocument Version in apex?

I'm getting insufficient privileges error when I try to create a new version for an existing file in apex. Code used to create new version: ContentDocumentLink cdl = [SELECT ...
3
votes
1answer
3k views

ContentVersion Content-Type

I need to stream a file from Salesforce in our webapplication. To make sure the file is properly opened, I have to set Content-Type header. How to retrieve the Content-Type (MIME) of a file? I ...
1
vote
0answers
162 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. ...
0
votes
1answer
284 views

Salesforce Files Connect and Azure: “Error: Invalid URL”

As of 2018-02-19, Salesforce's official "preferred" instructions to set up Files Connect with Azure/SharePoint include the following: Authorize Endpoint URL: Enter the URL as follows: https://...
1
vote
0answers
184 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 ...
6
votes
2answers
6k views

lightning:fileupload - Reduce number of files to upload to a single file at a time

As I understand, the multiple attribute, when set to false, will limit the number of files uploaded at a time to 1: Specifies whether a user can upload more than one file simultanesouly. This value ...
0
votes
2answers
556 views

How to move all the documents to File to make them available in lightning

We have a requirement where we need to move all the documents to File to make them available in lightning. We tried to export all the documents using fileExporter (AppExchange app), but we are facing ...
0
votes
2answers
1k views

External FTP File Transfer Activity Error in Automation Studio

I configured a Data Extract (Data Extension Extract) and a File Transfer (Safe House to External FTP which is also an SFMC FTP ). Unfortunately, File Transfer fails without giving a proper error. ...
5
votes
1answer
188 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 ...
-1
votes
1answer
463 views

Error while uploading File to S3 from Apex

I am using the below code to upload file to Amazon S3 from Apex class. public void uploadToAmazonS3 () { String filename = this.record.File_Name__c; String attachmentBody = EncodingUtil....
1
vote
2answers
1k views

Unable to create ContentDocumentLink from Force.com Site User

I have a requirement where I have to provide functionality to Anonymously upload File to Opportunity. I want to attach their uploaded content as Files instead of Attachment. I am able to create ...
2
votes
1answer
624 views

Using lightning:fileUpload component for uploading files without chatter Spring 18

I created a lightning component for uploading files due to the fact that in my business case, users are not meant to have access to chatter. So I opted for a component to do so, however when I try ...
3
votes
1answer
211 views

Body not a variable of ContentVersion?

I am drafting up a couple of unit tests for this code. Here is what the code looks like so far: public class ContentController { public ContentController() { file = new ContentVersion(...