Questions tagged [files]

This tag can be used for file related questions of any kind.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

Is it possible to have folders under the Opportunity / Notes & Files tab?

I tried to find out if it's possible to create folders where files can be stored, but all I can find is having the "File" tab separate and accessing the folders there through Libraries. Once ...
user avatar
0 votes
1 answer
13 views

Converting Lead to Contact Related Record Files are not attaching to Contact record

While I'm Converting Lead to Contact, Related Lead Record Files are not attaching/updating to a Contact record. Only record data is updating to Contact but not files, please help me with this public ...
user avatar
0 votes
0 answers
9 views

Need to Create Test Class for Apex Trigger that Prevents File Deletion if Attached to Opportunity [duplicate]

Need to get Code Coverage up, and not sure how to write a test class for this. Code below. Thanks for your help! trigger PreventOppyFileDeletePROD on ContentDocument(before delete) { if (Trigger....
user avatar
-1 votes
0 answers
17 views

How to insert a file in Apex which is physically on third party?

I'm inserting a file in "OneDrive" from Salesforce via "OneDrive" API. In API response we recieve the webURL of the file inserted on OneDrive. Now we need to insert this file in ...
user avatar
1 vote
1 answer
27 views

Max file size to upload to database when using input type file is not 4.5 MB

Max file size in 4500000 bytes which is almost equal to 4.3Mb not 4.5 Mb I see many blog wrote as 4.5 Mb Using input type file is not allowing to save 4.5 MB but it is allowing upto 4.3 MB Is my ...
user avatar
  • 361
1 vote
0 answers
31 views

Is video/mp4 a supported mime type?

I have a lightning web component that contains a file picker. If I pick an mp4 file then I encounter an error. Some thing similar to Unsupported MIME type: video/mp4. I'm using Spring '22 i.e. v54 ...
user avatar
  • 171
0 votes
1 answer
26 views

Getting error while upload file

I am trying to upload file in the files section in lightning. i am getting below error - I am getting this error only when attaching an email message which has a pdf attached to it. I tried ...
user avatar
  • 1
0 votes
2 answers
34 views

How to give Edit access to files to non-system admin users?

Purpose for this access is because the super users want to edit the File names to a proper naming convention that were uploaded in the Opportunity object. Permission sets I tried to assign: App ...
user avatar
  • 1,051
0 votes
1 answer
30 views

Uploading multiple Files only works if all files are selected at once

I am have an aura component where user are uploading files on a SF Site form. The files are not saved until the Form is submitted an the record is saved. If I select multiple files at one time all the ...
user avatar
  • 377
0 votes
2 answers
45 views

Update custom field on Opportunity on attached file deletion - Lightning

I have setup a trigger to update a custom checkbox Attachment__c on opportunity on uploading or deletion of file as an attachment. This seems to work fine on the file upload but fails every time on ...
user avatar
-1 votes
1 answer
47 views

Is Heroku Ephemeral File System where I can write to $HOME and /tmp?

For Heroku Ephemeral File System, I read in other posts that the location where I can write to are $HOME and /tmp? Also, does anyone know how I can view files saved in Heroku Ephemeral File System?
user avatar
  • 1
0 votes
0 answers
27 views

Issue with Files used in Lightning Email Templates

I'm having an issue with Lightning Email Templates in two sandboxes. Development sandbox Add image to Files. In the files list, the file does not have the [Asset File] tag next to it. Create a ...
user avatar
0 votes
0 answers
135 views

File preview(pdf) in LWC for community

I'm trying to use the following URL format to preview file in LWC but however it shows only the first page as image not the entire file. Is there a way to preview the entire file and not just 1 page? ...
user avatar
0 votes
0 answers
20 views

Files visibility across different profiles

I am having two different profiles like manager and technician. If a file uploaded by a manager for an order then it must not be visible to technician but the file uploaded by the technician for the ...
user avatar
  • 59
0 votes
1 answer
124 views

How to derive a direct link to a file from the link to the download page?

I have publicly accessible files in Salesforce (accessible by anyone, even without a Salesforce license), which can be accessed via URLs such as this: https://XXXXXXXX.my.salesforce.com/sfc/p/#...
user avatar
0 votes
0 answers
93 views

get pdf from external url

In the response from 3rd party I am getting url, I want to grab that url and save that pdf in a salesforce object. If I manually use that url and paste in browser it downloads the file. But when I use ...
user avatar
0 votes
0 answers
113 views

How can I preview an entire file with lwc in community?

the lwc file preview is not compatible with community : https://developer.salesforce.com/docs/component-library/documentation/en/lwc/use_open_files I tried this alternative : this[...
user avatar
0 votes
0 answers
41 views

How to access content library as guest user in experience builder

in "VNSK" library i have some images that i use as URL for custom object and later i'm retrieving this object via SOQL in my LWC component this works fine for manage library members (i have ...
user avatar
-1 votes
1 answer
39 views

How to upload salesforce file coming in application/octetstream format from another salesforce record

I am trying to fetch Salesforce attachment body using standard REST API /services/data/v50.0/sobjects/Attachment/<record-id>/body from an external tool. This API call returns me the data in ...
user avatar
0 votes
1 answer
29 views

Delete a file from a related list by non-owner

I have a record with a file in a related list. I want to allow a non-owner to delete that file. Since you can't add a custom button to that list and non-owners can't delete a file how can this be ...
user avatar
2 votes
0 answers
40 views

Connect API - set ContentVersion custom field on file upload

I'm trying to upload a file with the following request: curl -H "X-PrettyPrint: 1" -F 'json={"title":"BoatPrices"};type=application/json' -F "fileData=@BoatPrices....
user avatar
-1 votes
2 answers
90 views

get Actual content from a file from ContentDocumentId

I have written a query i.e : List<ContentVersion> contentversion = [SELECT VersionData,ContentBodyId,ContentDocumentId FROM ContentVersion WHERE Title =:customLabel]; Here I am getting all the ...
user avatar
0 votes
1 answer
107 views

Convert a 'content document' to attachment (ideally in flow)

I have a managed application that creates files (PDF) as content documents attached to a custom object (source). I also have another object where files from another process are interfaced to the ...
user avatar
0 votes
1 answer
169 views

Receiving corrupted content on uploading a File and retrieving it using REST API

I am consistently getting corrupted content on retrieving it using REST API, using SOAP flow is working fine on the other hand. One example of what's happening : I upload a PDF file under Files for a ...
user avatar
0 votes
1 answer
269 views

How to create a test class for apex that reads CSV file

I was trying to test my apex class that gets a CSV file, reads it and creates actual records. In my test class I tried to convert my CSV string into base64 string. Then I used this line of code Blob ...
user avatar
0 votes
0 answers
21 views

Best practice to automate sharing Files with users according to their level of access to the Email Template (LEX)

We wanted to enable global settings for Files "Set file access to Set by Record for files attached to records" in order for some of our users to have the correct (Read/Write) access to Files ...
user avatar
1 vote
0 answers
96 views

File sync issue from one org to another org

We are having a kind of Connector Application (bidirectional) which sync data between the two salesforce org which are using two different platform apps. This connector application has a functionality ...
user avatar
0 votes
1 answer
37 views

Can you explain the data tree that's created when you insert a file? [duplicate]

Can someone point me to documentation of the data tree/ that gets created (or confirm) when you insert a file in Salesforce? In testing I found that a ContentDocument, ContentVersion and 2 ...
user avatar
0 votes
1 answer
91 views

How to change default file upload size limit in salesforce?

In the documentation of lightning-file-upload it is stated that 'By default, you can upload up to 10 files simultaneously unless your Salesforce admin has changed that limit. The org limit for the ...
user avatar
0 votes
1 answer
76 views

How to skip files while refreshing full copy sandbox?

Not having a chance to exercise on production I need to recommend our administrator steps to initiate full copy sandbox refresh process. We would like to not to copy files from production. Is there a ...
user avatar
  • 335
0 votes
0 answers
22 views

Use URL to add files in Salesforce

Can I use a URL (use the URL inside a custom button) in order to create a file record within Salesforce? I tried to find the URL that is used didn't make it. I tried to use this URL but I get an error ...
user avatar
0 votes
0 answers
14 views

When using lightning file upload component, is there any way to detect that user clicks close "X" button or cancels?

Looks like LWC File Upload component has the single uploadfinished event which doesn't fire on cancel or when user clicks "x" button. We need to hide the file upload component if user doesn'...
user avatar
  • 13.2k
0 votes
1 answer
98 views

How to get folder ID for uploading documents in Lightning?

I'm trying to use the REST API to upload a File. Eventually I want to associate this File with a specific account. I'm following these instructions to upload a binary file, where part of the body ...
user avatar
  • 1,151
0 votes
0 answers
100 views

MyDomain (right frame URL) - prevent file with Public link to be downloadable

We administer multiple orgs for our clients and on the My Domain login page set the right frame url to their websites. With some clients we have issues where their websites have iframe/clickjack ...
user avatar
  • 1,387
0 votes
0 answers
243 views

How to create contentversion by using file url?

We want to create ContentVersion related to the account object. We have one field on account which contains the URL of the file(png/jpg/pdf). And by using that URL we want to create ContentVersion. ...
user avatar
0 votes
0 answers
21 views

What would be the best way to prevent certain file types attached to cases when received on Email-to-case?

What would be the best way to prevent certain file types attached to cases when received on Email-to-case? Important to note that I would like the case record to be created successfully and files ...
user avatar
  • 389
0 votes
0 answers
145 views

files access for guest users

I uploaded spreadsheet under file in Salesforce. Changed its security settings so that any one with link(Internal/external) can access it(see figure) I created a non authenticated lightning community(...
user avatar
0 votes
0 answers
69 views

File Preview is not working

I have create a LWC where we can upload file and delete and download also preview, but when I try to preview file it's not happening. Its showing content document Id when I click on preview action. So ...
user avatar
1 vote
0 answers
240 views

Sending files with REST API

We are using the REST API to create and update records for a client (using PHP). So far this has been fine but can't seem to send files and associate this with a record. Have tried using the "...
user avatar
0 votes
0 answers
20 views

Get number of shared Type where shared type='V'..Please help with this

I want to fetch the number of sharedType where value='V'. for example, In the above picture there are 3 values with 'V' for sharetype. So the size should be 3. Please help me with this how to get this?...
user avatar
  • 1
0 votes
0 answers
73 views

File Delete Access to Certain Group of Users

Whenever a Content Document is Uploaded on a record, I need to Share the file to a group of users and give delete Access to the same users. I've Implemented a trigger to share the Document With the ...
user avatar
0 votes
1 answer
159 views

How to fetch the latest file in SOQL from each Order record

I am querying files from the list of Order records through SOQL. I have added my SOQL query below for your reference. I want to query only the latest file which begins with 'IO_' from each Order ...
user avatar
0 votes
0 answers
15 views

Can we check user have permission for creating Content Distribution records or not?

I am trying to find out can we check whether a user have permission to create content distribution records or not. Permission to create Content distribution records depend on the folder in which we ...
user avatar
  • 3,309
0 votes
0 answers
54 views

What is "eid" in the file picker standard URL?

I am trying to figure out the random Id that generates every time when we click attach file on Notes and Attachments. I copied and paste the Id in the URL but it does not resolve to any valid page but ...
user avatar
  • 6,616
0 votes
0 answers
35 views

Change the path source of upload LWC

I'm creating a LWC to upload files from files App inSalesforce. The upload for LWC only goes to computer's files. Does anyone know how to propose upload from files(just like for the related list "...
user avatar
0 votes
1 answer
362 views

In Asynchronous using Rest Api Error: System.LimitException: Apex heap size too large: 19312398

I got the error as heap size limit too large, I'm able to send below 2MB file by using Asynchronous method but the limits is 12MB and trying to send 12MB file to external system by using Rest Api. ...
user avatar
1 vote
1 answer
99 views

I have used Multipart/message but still i got the error as heap size limit too large. I'm able to send below 2MB file

I have used Multipart/message to send Large size of file from Salesforce to External system. but still I got the error as heap size limit too large, I'm able to send below 2MB file. Source Org public ...
user avatar
0 votes
0 answers
36 views

Contentfolder object capturing Id in the Name field on adding a library and folder inside of it. Is that correct?

I have created a library and subsequently, created two folders inside of it. Then, I went to the workbench to see how data is stored in ContentFolder object. Records are created and the Name column ...
user avatar
  • 6,616
0 votes
0 answers
15 views

How to write the code for Multipart/message in Rest api to share large size of file ContentVersion? [duplicate]

Im able to send a file till 2MB of the file size but I need to send a maximum of the file size in REST Api. so I need to update this code by using Multipart message.. Sourch Org Code public class ...
user avatar
0 votes
1 answer
142 views

How to access files from a particular folder in a library to send it as attachments through an email?

I am trying to find a way to query files from one of the folders in a library. I am seeing there is no strong direct relationship between library and folder it seems. My use case is, I need to query ...
user avatar
  • 6,616

1
2 3 4 5
9