Replies: 2 comments 8 replies
-
|
Hi @gianpispi, we have plans to look into this, but can't commit on a timeline. Referencing files on disk from the database brings extra complications, and I'm not sure even SwiftData handles it correctly. For example, do you know what SwiftData does if one deletes the file from disk directly? Does SwiftData observe that and clean up the data in the database? |
Beta Was this translation helpful? Give feedback.
-
|
I was able to manage these externally by syncing them myself onto CloudKit. I create separate CKRecord type and set up the asset field. When a new record is created from the main table, I will make sure the asset gets uploaded as a separate CKRecord, then I store the recordName as an ID field (something like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Looking ad SwiftData, it would be great to have some externalStorage attribute for image fields, that automatically and atomically move the image to the documents folder and insert the path to the db.
This could be an even bigger impact for this to work with CloudKit out of the box - I saw it works already with blob fields.
I just don't like to store big images inside the database itself
Beta Was this translation helpful? Give feedback.
All reactions