Dexie.js icon indicating copy to clipboard operation
Dexie.js copied to clipboard

Allow the user to import into a different database than the one specified in the file

Open tobiasBora opened this issue 1 year ago • 4 comments

Fix https://github.com/dexie/Dexie.js/issues/1972 The callback allows a quite flexible solution as I can ask to the user a different name if the database already exists etc…

tobiasBora avatar Apr 29 '24 23:04 tobiasBora

Could we use a simpler approach and just allow an optional name property? I suppose letting the name depend on the other info from the file is less common use case but when that is needed, one could use peakImportFile() to get that information beforehand.

dfahlander avatar May 08 '24 12:05 dfahlander

Sorry, I missed your message. I wasn't aware of peakImportFile, it seems indeed to be good enough for my need if an optional name is provided. I'll try to see if it works and submit a new pr if yes. Thanks!

tobiasBora avatar Jun 13 '24 23:06 tobiasBora

Ok, this one is tested (and fixed) now that I fixed my issue with https://github.com/dexie/Dexie.js/issues/1995#issuecomment-2166951977 Should be good to merge.

tobiasBora avatar Jun 14 '24 08:06 tobiasBora

Any update on this?

tobiasBora avatar Jul 07 '24 23:07 tobiasBora