I'm using my LWC to upload photos as Files for a specific Custom Object within a community.

<lightning-file-upload label="Upload your photo" record-id={obj.Id} onuploadfinished={handleUploadFinished} file-field-name="IsMainPhoto__c" file-field-value="true"></lightning-file-upload>

When the user uploads the photo and the handleUploadFinished finishes, the photo is stored as a File of the obj, but the field "IsMainPhoto__c" is not set to true.

If it's useful, that community profile has privileges for R and W, and View All for the Custom Object.

Can anyone tell me why it's not working?

Thanks in advance!

1 Answer 1


The API name of the custom field must end with fileupload__c.

Please refer to documentation


  • I don't know how I overlooked this point!! Thanks a lot! Oct 28, 2020 at 8:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .