Content-hub import Pictures
-
Hi all,
i'm making an App that must use Pictures stored on the device.
Using my app the user choose the Pictures to be imported. To do that I'm using the Content-hub.
Picture selection and importing works correctly.
The problem is that each selected and imported image is placed in that folder:
'/home/.cache/<MyApp>.fulvio/HubIncoming/'
(where <MyApp> is the App id of my application).
That cause duplication of the images (and space consumption) because the same image is placed in the original folder (where the user pickup it) and in the above one.For my purpose is necessary only have the path/url to the chosen images, (not also a copy of the image under /home/.cache/<MyApp>.fulvio/HubIncoming) so that in my app i can do a thing like this:
Image {
source: <the link to the Image>
}Is possible ?
Thanks !
-
I think that's the idea of the content hub by design. Every app can only work with his/her own chunks of bits, so if you make a photo send with signal and telegram, then you have 3 copies of that file, because if you delete it on the phone, signal and telegram are still using their copy...
Image { source: <the link to the Image> }
is possible in unconfined profile in apparmor apps, but then your app needs a manual approval in the open store
-
The copy in HubIncoming is deleted after the device is restarted. You must copy the picture url into the folder you want to use it (under your app).
You could access any filie in the system if you unconfined your app but it's considered a bad practice. That's why the Content Hub serves you the image for you