Questions tagged [files]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
7answers
8k views

uploading files in contentVersion using lightning component

I am developing a lightning component to upload files in the contentVersion object. I used this site as a reference: http://peterknolle.com/file-upload-lightning-component/ I was able to ...
2
votes
1answer
437 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 ...
5
votes
1answer
12k views

Difference between File and Attachment in SalesForce

We have been using Notes and Attachment to store files related to the record. I also read about Files in salesforce. How are Files different from Attachment? Are there any limitations or benefits of ...
30
votes
7answers
10k views

Obtaining all ContentDocument records using SOQL

According to the Salesforce documentation on ContentDocument Users (including users with the “View All Data” permission) can only query files they have access I find this very strange. Why would a ...
3
votes
1answer
2k 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 ...
5
votes
1answer
3k views

Triggers on ContentObjects

We've been working with Attachment records on our custom objects, and we now need to migrate to Files (you know, that related list that shows up everywhere). We have a lot of trigger logic on ...
3
votes
2answers
6k views

Display image which is stored in files

How can I display an image which is stored in files? For attachments I can use the code below, but it doen't work for files. <apex:image id="Stat1" URL="/servlet/servlet.FileDownload?file=...
4
votes
1answer
17k views

how to upload files using Apex code

I am creating a VF page to upload files to to the Files related list of an object : I found out that files object is ContentDocument object. I am figuring out how I can create this ContentDocument ...
7
votes
1answer
4k views

Content Document download URL params

I spend hours to find a way to control download behavior of pdf-files (when to download and when to show inline) and did not find anything. What I got so far: the main thing that do all files ...
1
vote
2answers
1k views

I want to associate File With Custom Object but getting Error

I am trying to create new File through ContentVersion and Associating it with Custom Object ParentId is ID of Custom Object . Error given is Document: You cannot create a link for a document in a ...
7
votes
1answer
748 views

Visualforce: Why the display of an PDF-File inside an IFRAME works on a Sandbox but not in Production?

On a Visualforce page I have an IFRAME like this: <iframe class="viewer" src=""></iframe> It starts up an shows nothing because src is blank. Good. To store the actual PDF I upload it as ...
4
votes
3answers
5k views

How to share files uploaded in “Files” related list to Community Users

With Winter 16 release, Salesforce gave the ability to add Files related list to a Custom/Standard object record. https://docs.releasenotes.salesforce.com/en-us/winter16/release-notes/...
5
votes
1answer
901 views

How to Upload a File to a specific Library Folder using Apex?

I am trying to save a Visualforce page as a PDF file to a Library folder in our Salesforce org. I have been unable to figure out how to save this new PDF file to a specific Library folder. I tried ...
5
votes
0answers
795 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 ...
6
votes
1answer
7k views

How to query all files attached to the Opportunity

I know how to query all the attachments related to the opportunity, but how to do the same for files attached. Seems like a file is a part of a content library.
2
votes
1answer
4k views

Where are the documents from the Documents tab in Lightning?

Our org has switched to Lightning recently and, as expected, there is no Documents tab. From what I've read the equivalent to Documents in LEX is Files. I would like to know where are the actual ...
2
votes
0answers
679 views

Display image from “Files”/ContentVersion in VisualForce [duplicate]

I'm working on a project where I'll be using VisualForce to render custom PDF service reports. So my page will take in the ID of a Service object (from Field Service Lightning) and populate all the ...
2
votes
1answer
559 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 ...
1
vote
1answer
2k views

Salesforce Files Vs Salesforce CRM Content [closed]

Which one is the future? Or shall they continue to coexist? Can there be a scenario where both features are recommended to be used in tandem or interchangeably?
1
vote
1answer
985 views

How to unit test file uploading?

The code as written below uploads a file to salesforce, then redirects the user to a specific page. public class ContentController { public contentController() { file = new ...
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 ...
0
votes
1answer
119 views

Disabling 'Populate Custom Fields When Uploading Files' feature

I'm using lightning:fileUpload component to load files, and I came accross a new, unnecessary feature. Recently when adding file, the button on popup window displaying uploading status changed from '...
0
votes
2answers
101 views

Option to share a file uploaded privately with a Community User

When i upload a file under Files Tab we have share option. But we can only share with internal users...but not with partner users. I was wondering if its possible to share file with a partner ...
0
votes
1answer
121 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 ...
0
votes
0answers
299 views

Convert ContentVersion blob to bytestream for OneDrive Upload (MS Graph API)

I'm attempting to upload a file (VersionData from ContentVersion) to OneDrive using the Graph API Resumable Upload Method: https://dev.onedrive.com/items/upload_large_files.htm I'm able to create ...