Summary
The @powersync/attachments package currently requires the legacy expo-file-system API due to how AbstractAttachmentQueue constructs and passes file paths to StorageAdapter methods. This makes it incompatible with Expo SDK 54+'s modern file system API without workarounds.
Background
As of Expo SDK 54, the new object-based expo-file-system API (File, Directory, Paths) is now stable and the default. The legacy API has been moved to expo-file-system/legacy.
The Problem
AbstractAttachmentQueue builds full URI strings and passes them to StorageAdapter methods:
// AbstractAttachmentQueue.ts
getLocalUri(filePath: string): string {
return ${this.storage.getUserStorageDirectory()}/${filePath};
// Returns: "file:///var/mobile/.../Documents/attachments/abc.jpg"
}
Summary
The
@powersync/attachmentspackage currently requires the legacyexpo-file-systemAPI due to howAbstractAttachmentQueueconstructs and passes file paths toStorageAdaptermethods. This makes it incompatible with Expo SDK 54+'s modern file system API without workarounds.Background
As of Expo SDK 54, the new object-based
expo-file-systemAPI (File,Directory,Paths) is now stable and the default. The legacy API has been moved toexpo-file-system/legacy.The Problem
AbstractAttachmentQueuebuilds full URI strings and passes them toStorageAdaptermethods:// AbstractAttachmentQueue.ts
getLocalUri(filePath: string): string {
return
${this.storage.getUserStorageDirectory()}/${filePath};// Returns: "file:///var/mobile/.../Documents/attachments/abc.jpg"
}