Questions tagged [fileupload]

For questions related to the lightning:fileupload component

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

User assigned with Read-only permission set group can upload files

In my org there is a permission set group called ReadOnlyFundingOpportunity with the following permission sets: ReadOnlyFundingOpp on the FundingOpportunity object. I assumed a user assigned with ...
0 votes
1 answer
37 views

ContentDocumentLink Trigger successfully blocks file upload on Org but fails in Dev Console

I want to block file uploads (ContentDocumentLink) on a FundingOpportunity object when status is Canceled or Closed. It works fine in the org, but it fails when I tried it on Dev console. A File is ...
0 votes
1 answer
34 views

Concern with "modify all data" permission to upload a new version of a file

As per the documentation regarding Upload a New Version of a File, the note section says that Only file owners, collaborators, and users with the Modify All Data permission can upload new versions of ...
0 votes
2 answers
2k views

Append files to the first upload in <lightning:input type="file">

I am using the following code in my lightning component to upload multiple files <lightning:input aura:id="fileId" onchange="{!c.handleUploadFinished}" type="file" name="file" label="Upload ...
2 votes
1 answer
3k views

How to trigger the click event of <lightning:fileUpload>

I want to display the lightning:fileUpload differently After many tryouts with css hacks, I decided this is not good enough My current approach is to create a different button, and upon clicking on ...
2 votes
2 answers
2k views

lightning:fileupload - Override default error message when unacceptable file format is uploaded

I am using lightning:fileupload in my lightning page. It works fine, but I am unable to override the default error message displayed (your company does not allow the file format...etc). Business wants ...
1 vote
1 answer
2k views

What data type can be used to support file uploads in Salesforce?

I have a custom object and I want to add a new field to support file attachments. For example, while creating new record, I want the user/admin to have an option to attach files to that record during ...
-1 votes
1 answer
73 views

Attach file stored in ContentVersion object to ServiceNow Incident

I'm writing an integration in Salesforce where users can create an Incident in ServiceNow from within Salesforce. I'm able to create the Incident fine from Salesforce. I need to be able to attach a ...
4 votes
3 answers
4k views

How to show custom error message in lightning-file-upload in lightning web component

I need to show a custom error message in lightning-file-upload when we tried to upload the unacceptable format of the file. <lightning-file-upload label="Attach receipt" ...
1 vote
2 answers
1k views

Drag and Drop - multi file upload in Custom Lightning Component

I want to create a drag and drop multi-file upload in a lightning component form. The form is displayed in a community. I have used <lightning:fileUpload label="Attach receipt" ...
2 votes
1 answer
1k views

Rich Text pictures - how to find and manage them

is there a way to find and address picture uploaded via Rich text editor? How they are stored in system? Can reuse uploaded files somehow in different rich text field?
0 votes
1 answer
884 views

How to reset uploading file in lwc

When I click on new button then I uploaded the file using lightning file upload now if i'm clicking on cancel button, then I'm again click on new button then the previous uploaded file is there. How ...
0 votes
2 answers
1k views

Restrict file size Lightning file upload?

I have a Lightning file Upload component I am using Lightning:fileupload . so user tries to upload more than 100MB. I want to show an error message, it is possible?
2 votes
2 answers
2k views

LWC File Upload component ignores accept setting for drag-and-drop

There is a strange behaviour in LWC File Upload component. There are two ways how files can be uploaded through this component. The user can: Select a file on your system by clicking the button to ...
0 votes
1 answer
49 views

Unable to Upload Files of Lightning Flow launched by Visualforce

We are using Visualforce override page for New Case Action that is triggering Lightning Screen Flow via Lightning Out. The Lightning Runtime in Visualforce Page was Rendered according to Salesforce ...
0 votes
1 answer
2k views

Upload File Content via LWC to Apex

I am trying to build a Custom JSON to Records Import from a Record List view page. On the Click of a Button or Action Link, a File Upload should be displayed in a modal Lightning modal and the Blob ...
0 votes
1 answer
676 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 ...
0 votes
0 answers
82 views

i am trying to upload and store files in multiple collections in Screen Flow but its not assigning ContentdocumentLink in Assignment

I am working on Screen Flow. and i want to upload multiple files and also to store multiple file in related Record Id. as i am doing with content document link i need to assign and add single content ...
0 votes
1 answer
144 views

File size limits in Content builder

To Content Builder, I can upload video file up to 5 MB per file: https://help.salesforce.com/s/articleView?id=sf.mc_ceb_supported_file_types.htm&type=5 But how do you increase this limit? For ...
1 vote
1 answer
172 views

Image limits in Content builder

I found that there is a limit on the size of the image (5 MB) in Content builder https://help.salesforce.com/s/articleView?id=sf.mc_ceb_supported_file_types.htm&type=5 But is there any limit on ...
1 vote
0 answers
1k views

How to upload a Salesforce File using REST API properly?

GET /services/data/v47.0/sobjects/ContentVersion/0000v00000MFIVgAAP/VersionData from this request I will get binary file content, but how can I use this content to recreate the file properly (using ...
4 votes
3 answers
10k views

File Upload component in Flow - no indication that files where uploaded

I am using the File Upload component in Flow. It works good, but I have no indication that the files where uploaded. So the flow looks exactly the same before and after I upload files: Before ...
0 votes
0 answers
154 views

Get content body of upload file in Flow

Hello guys I have a button in an the objet SObjectOne that calls a Flow that get the recordId of this current record and also uses the UploadFile component. After this I call an Apex class. So in this ...
0 votes
1 answer
2k views

(LWC) Your company doesn't support the following file types: .csv

This is in a Full Sandbox. Been using an LWC which I created to accept a .csv file upload. It's been working for months with no issues. Today I went to test a new dataset and received the following ...
0 votes
1 answer
57 views

How do I increase the max size of files that can be uploaded with AuraClient?

We are trying to upload files with the AuraClient. Getting error: auraclientinputexception max message parameter length. The limit is even smaller in our sandbox server (3MB or so) Is there a way ...
0 votes
1 answer
94 views

div onclick get id returning random numbers

Context: I have a dynamic number of lightning field upload and i'd like to know from which i'm uploading so i can tag the files to a certain file upload. and there can be a lot more. For each file ...
0 votes
0 answers
187 views

Increase File Upload Limit LWC

I have been struggling with this for too long. I have a business requirement to upload files in a community for guest users and I would say it needs to be around 30MB. This is what I'm using for my ...
0 votes
1 answer
1k views

Filereader.readasDataUrl is not throwing error when file is uploaded through lightning-file-upload

I have an LWC component which takes xlsx/xlsm file as input and sends the file data to an API as input. Initially, I used lightning-input with type=file which is working as expected for files <3MB ...
0 votes
0 answers
22 views

Attach multiple files in Push Notification

Hello I and using a lightning-input file that allows the users upload multiple files. In the apex controller I want to send a push notification to clients with a message and the attached files the ...
1 vote
0 answers
408 views

File Content is missing while uploading as multipart/form-data using FETCH API

I am trying to upload file to contentversion object using javascript with the help of FETCH API. I'm able to upload the file successfully but the content is not displaying. Please find the form ...
-1 votes
1 answer
172 views

How can I create custom addError message in ContentVersion trigger?

I have a trigger that will prevent the user to upload file but the error message in ContentVersion is being overridden by Lightning. How can I create a custom error message? trigger CDTrigger on ...
0 votes
0 answers
68 views

How does After Trigger works when using addError in ContentVersion object? Is the file successfully uploaded or not?

I have a custom object with related files in a page layout. Now if user click the 'Upload files', I want to prevent user to upload a file. Seems like I cannot use 'before trigger' because I cannot ...
11 votes
2 answers
9k views

How to upload larger size file using input tag of type html in LWC

I have implemented custom file upload component using input file html tag and rendering it as browse file button. The issue with component is:- When trying to upload file more than 4 mb of size, i ...
1 vote
0 answers
890 views

Salesforce Flow File Upload component get outputs before Next button

I have a flow on a community site (guest user context) using the standard file upload component to allow users to submit files. Since guest users can't access Opportunities and I need to link these ...
1 vote
1 answer
856 views

'Upload files or drop files' to 'Upload file or drop file'

How can I change the 'Upload files or drop files' text to 'Upload file or drop file'. When I am allowing single file upload in lightning-input component.
1 vote
3 answers
4k views

Hot to change the button label for lightning-file-upload?

I created file upload function using lightning-file-upload. Its buttons are showed "uplopadFiles" and "ordrop files". I would like to change those to proper Japanese. Could you ...
3 votes
1 answer
416 views

Unable to upload a file in login flow

Is there a known issue with file upload in flow login? Because, I don't have problems in upload a file with the same flow attached to a record page, but when is inside a login flow the same flow is ...
0 votes
0 answers
1k views

How to Jest file upload

I am stuck with Jest testing of file resize/upload logic. This is a simple job to resize uploaded image and add it to the Notes & Attachments based on recordId. It is not a production code - it ...
0 votes
1 answer
305 views

Salesforce: Read email attachments on file upload LWC

I used lightning-file-upload to allow Users to upload files. Now, one of the use cases is, if the file is an email (.msg file type), we need to split the attachments and upload them as individual ...
0 votes
1 answer
538 views

Upload file in child and submit in Parent

I have lightning-input tag with type as file in Child component, and I am making use of this child component in Parent component which contains Submit button. So when the user clicks on submit , file ...
0 votes
0 answers
464 views

System.DmlException: Insert failed. First exception first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Linked Entity]: [Linked Entity]

Updated the code here. I am trying to override the standard file upload button functionality. I have created a lwc on a VF page and overrode the 'Upload files' button in FILEs object. As soon as we ...
0 votes
1 answer
2k views

LWC - Rename file before upload JS to Apex

I want to automatically change/update the name of a file as it's uploaded. I'm accepting files as these formats only get acceptedFormats() { return ['.pdf', '.png','.jpg','.jpeg']; } So for ...
-1 votes
1 answer
144 views

How Salesforce manage attachment while sending an email from record detail page under activity? [closed]

I am curious to know, how Salesforce manage attachments which we add while sending an email from activity. Does Salesforce stores those files somewhere in hidden objects and use them once we click on ...
0 votes
0 answers
160 views

How can I map the Upload / attachment to a custom field of a custom object in surveys?

I have below requirement. We are not getting upload/Attachment related questions while mirroring the questions to custom object fields. I am creating a survey. I have a survey questions which contains ...
1 vote
0 answers
819 views

LWC - Upload canvas image(.jpg, .png) file to the server(person account)

I'm trying to make a functionality where I would like to allow users to save the captured images to the server. The general idea is: Capture/Create an image on an HTML5 canvas using a button and When ...
0 votes
0 answers
820 views

Aura Upload file with inputfield/required field

I have an Aura component with the upload component, but now I want to add an inputfield which information should also stored in the file information. How can I add the information for the ...
1 vote
1 answer
1k 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 ...
-1 votes
1 answer
683 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?
0 votes
1 answer
2k views

Test class for an Apex class with ContentDocumentLink [duplicate]

I have written a LWC component for file upload using ContentDocumentLink and it is completed. Right now I am writing a test class for the Apex class. Apex class: public with sharing class Sitevisit{ ...
3 votes
1 answer
1k views

Experience Site: Lightning-file-upload Issue

I have created an unauthenticated LWR experience site and added a simple LWC component. The component contains a lightning-file-upload component. If I upload a file using it, the component disappears ...