You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In CreamAsset's create methods, it allows to save file to places other than the default place. with public static func create(objectID: String, propName: String, url: URL, shouldOverwrite: Bool = true) -> CreamAsset?.
However, the filePath: URL property is incorrect.
/// Where the asset locates in the file system
publicvarfilePath:URL{returnCreamAsset.creamAssetDefaultURL().appendingPathComponent(uniqueFileName)}
It always indicates that assets are saved in the default place. However, this may not be true. For example, if someone uses shared group container, which is common when developing Extensions like Share Extension and Today Extension, the saving place will not be the default place.
I have just made a small patch for this. Just changing the computed filePath to lazy property and assign the value when a url is given explicitly.
The text was updated successfully, but these errors were encountered:
In
CreamAsset
'screate
methods, it allows to save file to places other than the default place. withpublic static func create(objectID: String, propName: String, url: URL, shouldOverwrite: Bool = true) -> CreamAsset?
.However, the
filePath: URL
property is incorrect.It always indicates that assets are saved in the default place. However, this may not be true. For example, if someone uses shared group container, which is common when developing Extensions like Share Extension and Today Extension, the saving place will not be the default place.
I have just made a small patch for this. Just changing the computed
filePath
to lazy property and assign the value when a url is given explicitly.The text was updated successfully, but these errors were encountered: