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
bdPeterbdPeter 

Storing files in SmartStore

A few months ago you guys mentioned that you were working on a file storage solution for SmartStore (for among other things, to allow safe and encrypted storage of objects larger than 1MB - the maximum field size in SmartStore).

 

Is this still the case and when do you expect such an SDK addition might become available? In my application I would like to store large documents, audio files,etc in SmartStore until they are ready to be uploaded as an attachment to selected Salesforce records. In my case, ideally the SmartStore handles files (or fields) equal to the maximum size of a Salesforce attachment.

 

Thanks

Peter

SoleesSolees

Peter you could use SQLite3 for this storage and converting the Data into Base64 and adding SQLCipher.

 

By the way, where can i find usable code to start developing iOS with this SmartStore offline thing?

bdPeterbdPeter

Hi Solees, I currently store a base64 string (representing e.g. a picture or PDF document) in the SmartStore. The problem is that the underlying SQLLite puts a maximum of 1MB on such fields. For larger attachments file storage is needed. I need those files to be included in the SmartStore so that a) they are encrypted just like anything else in SmartStore, and b) get automatically deleted when the user logs out.

 

I probably could do all this work myself but my understanding is that the Salesforce Mobile SDK team is working on exactly such feature. I am sure Salesforce customers would rather see Salesforce-produced SDK code in my app than any proprietary code I would produce. I posted my question above to find out whether the Salesforce Mobile SDK team has a target release and date yet for this feature.

 

Peter