@breinsnet wrote:
So I have a model and a serviceModel… The model is a simple exported class with a few attributes and a couple of methods. The serviceModel is an ionic service
The model has many images, through a second model. I can access the images via model.images
The images are stored on the mobile filesystem. This is a must as the app has to work offline
The model can be uploaded and downloaded from an API. The modelService takes care of that.
Now the question is… how do I manage the images stored in the filesystem. I can see two options:
The modelService downloading the images, updating the image path and src attribute, also create directories. Basically taking care of everything related to manage the file and webview actions.
The modelService downloads the file to a temporary directory and send the path the the model. The model then copy the file to the correct location and creates the webview url.
The main difference is that I’ll be using cordova file and webview within the model or not.
I’m more prone for the second option, but would like your feedback before writing bunch of code.
Thanks
Posts: 1
Participants: 1