I am uploading a file as a community guest user, but I am getting this error message:

There was a problem uploading your file. Please try again.

Displayed here:

enter image description here

And this error in the console:

Failed to load resource: the server responded with a status of 401 (Unauthorized)

from this URL:


I have enabled the Allow site guest users to upload files feature in:

Setup > General Files Settings

And according to the release note Let Community Guest Users Upload Files this is all I need to do to enable upload as a community guest user.

The <lightning:fileUpload is configured as below:

<lightning:fileUpload name="fileUploader" 
     label="Upload File" 
     onuploadfinished="{! c.handleUploadFinished }" />

The recordId value defaultUploadRecordID is definitely set.

The defaultUploadRecordID is set to the RecordId of a custom object.

The Site Guest User has full permissions over the custom object.

Feed Tracking is enabled for the object the upload is being attached to.

The community has a file upload limit of 6 MB and allows .pdf files to be uploaded.

I've tried hardcoding the recordID and it still fails.

If I run the page as System Administrator it works fine.


  1. What is causing the error?
  2. How can I fix it?
  • 1
    did you look at your own question
    – RedDevil
    Commented May 14, 2019 at 9:17
  • @RedDevil thank you for trying to help, but yes I had looked at that, which is why my question is so detailed.
    – Robs
    Commented May 14, 2019 at 10:37
  • my intention was to say there is information in that question, my apologies if it came out as rude. This aside, i tried uploading files using the tag to a contact and once i enabled guest user access to file and read access to contact for guest user it worked perfectly. Did you check network of chrome to see if browser is showing an error in xhr response
    – RedDevil
    Commented May 14, 2019 at 12:06
  • 1
    @Robs I will try it out sometime today and will definitely come back and let you know what I find.
    – Jayant Das
    Commented May 15, 2019 at 16:03
  • 1
    @Robs. I found this here which exactly seems to be your case. Support needs to be engaged for sure -- The permission "Changed Decoupled upload support for ContentVersion (Files)" which was previously disabled on your org which causing this issue, We have enabled this permission now which fixed this, This enabling can done at our end I suggest whenever you face this issue I request you to log a case with sales force with reference to this case number So that we can take it from there
    – Jayant Das
    Commented May 15, 2019 at 21:31


You must log in to answer this question.

Browse other questions tagged .