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

Module less versatile due to OS feature prevention

Open oliversalzburg opened this issue 7 years ago • 7 comments

imgcache.js disables Gallery integration on Android and backups on iOS. I actually want those features, but imgcache.js provides no means to control the behavior.

I made a crude change in our fork, which works for us for the time being, but I'd like to hear thought regarding this issue.

oliversalzburg avatar Sep 06 '18 16:09 oliversalzburg

I think what you're aiming to achieve can be controlled by setting the target directory of the cache, in order to use an OS backed up directory. You need to override the following setting:

ImgCache.options.cordovaFilesystemRoot

Look at the js file header for more details.

But maybe I didn't understand your exact requirement.

Le jeu. 6 sept. 2018 à 16:41, Oliver Salzburg [email protected] a écrit :

imgcache.js disables Gallery integration on Android and backups on iOS. I actually want those features, but imgcache.js provides no means to control the behavior.

I made a crude change in our fork https://github.com/fairmanager-cordova/imgcache.js/commit/d0c5cd2b4914bc28f8ae38eafcb7d15ec867ee98, which works for us for the time being, but I'd like to hear thought regarding this issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chrisben/imgcache.js/issues/230, or mute the thread https://github.com/notifications/unsubscribe-auth/AApdPoo2ffOL8qyww7MGEoPXuWs1Au3eks5uYVA9gaJpZM4WdT4M .

chrisben avatar Sep 06 '18 16:09 chrisben

It doesn't really matter what folder you set, the library will always create a .nomedia file in the target directory, which prevents the contents from being indexed by the Media Scanner.

On iOS, the library will set the com.apple.MobileBackup key on the file system entry to prevent it from being backed up to iCloud.

I do not see a way to control that behavior currently. In case I misunderstood your suggestion, please let me know.

oliversalzburg avatar Sep 06 '18 18:09 oliversalzburg

I see now.

I will add an option to disable this behaviour soon, I hope by the end of the week.

chrisben avatar Sep 06 '18 18:09 chrisben

Oh, wow. Awesome :) I'll be sure to check it out.

oliversalzburg avatar Sep 06 '18 19:09 oliversalzburg

Have a look at the new branch above, and let me know if that's what you were looking for. I'll merge it if that's ok.

chrisben avatar Sep 09 '18 15:09 chrisben

@chrisben That looks awesome 👍

oliversalzburg avatar Sep 10 '18 18:09 oliversalzburg

@chrisben Do you plan to merge that feature branch anytime soon? I would really like to use your official version and rebase my work on top.

oliversalzburg avatar Sep 17 '18 10:09 oliversalzburg