Fix: use sub path /Document/photo_gallery to save file

This commit is contained in:
jianjun 2020-10-22 15:52:02 +08:00
parent 44842c0b1b
commit c51a34e70d

View File

@ -409,7 +409,7 @@ public class SwiftPhotoGalleryPlugin: NSObject, FlutterPlugin {
let tempFolder = paths[0].appendingPathComponent("photo_gallery") let tempFolder = paths[0].appendingPathComponent("photo_gallery")
try! FileManager.default.createDirectory(at: tempFolder, withIntermediateDirectories: true, attributes: nil) try! FileManager.default.createDirectory(at: tempFolder, withIntermediateDirectories: true, attributes: nil)
return paths[0].appendingPathComponent(mediumId+ext) return tempFolder.appendingPathComponent(mediumId+ext)
} }
private func toSwiftMediumType(value: String) -> PHAssetMediaType? { private func toSwiftMediumType(value: String) -> PHAssetMediaType? {