overcommitted / ParcelKit

ParcelKit integrates Core Data with Dropbox using the Dropbox Datastore API
MIT License
567 stars 38 forks source link

Does ParcelKit support Core Data with image ? #12

Closed sarunw closed 10 years ago

sarunw commented 10 years ago

Does it support entity with image ? Both Binary Data (Allow external Storage) or by keeping file URL.

nullproduction commented 10 years ago
CGDataProviderRef provider = CGImageGetDataProvider(image.CGImage);
NSData* data = (id)CGDataProviderCopyData(provider);

You can save NSData in CoreData and PacelKit work with nsdata. However, we must remember that the maximum size of the dropbox storage - 10 mb,

Clstroud commented 10 years ago

@nullproduction I'm doing some pre-development research and ran into ParcelKit... Touching on this same question, it sounds like Dropbox will only allow a 10 MB binary data entry, which isn't unlike Core Data's limit for internal storage. That being the case, is it not possible to (optionally) utilize the alternate storage APIs in Dropbox to write files larger than 10 MB and store the URLs rather than the data? Seems to me like a feasible abstraction.

Of course that would take a little more configuration than what it looks like ParcelKit currently requires, which is why I think it would need some sort of flag to opt-in.

My apologies if this is covered elsewhere and I haven't seen it yet. Like I said, I'm simply doing some research and wanted to explore this option. External storage is a deal breaker for me if it can't be implemented. I may also volunteer to attempt an implementation if this sounds like something that could be merged in for others to use.