function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rahul Sangwan7341Rahul Sangwan7341 

Not able to access files in SOQL in without sharing class on public site pages of files are uploaded from classic view. But if i am uploading file from lightning view, i am getting result in seconds

Leonardi KohLeonardi Koh
Note: files uploaded from classic are not saved as the same object as the one from lightning experience user interface.
We ran into similar issue recently because our app had been running with the classic UI for quite some time and it was expecting uploaded files were of the attachment type. But as it turns out, when the user is in Lightning Experience mode files they uploaded were instead saved as Salesforce Files in the system.

Salesforce have generally speaking been moving towards Salesforce Files so this was not unexpected, it did however caused us a fair bit of headache as we were not aware of what was going on at first.