In my project I save photos from camera or from gallery in a SQLite local database and after this I am sending them to a MySQL remote database. I need to compress those images to send to remote server, so I decided to make this compression (and transform into base64 data) when I get all records from SQLite. My blocks are this:
In fact, I was reducing and saving as base64 in SQlite, but I changed this way, so in SQLite I am saving by filepath. The blocks I showed is when I m taking all data from SQLite and preparing to send to MySQL database
There are two image fields. Both fields can receive images from camera or from gallery (We discussed about it in the other topic). And in SQLite they are stored this way:
should be OK, possibly something else causing the error. Will be needed for the camera file path.
You would need to isolate where the error arises (debug)
You could also use just one instance o ImageConvertor for the resizing, just call the second resize from the event of the first (use a variable to define which one is being called, e.g. first, second)
Be aware that if you are using ImagePicker it only stores the last 10 files. Thus, if you are saving more than ten files to sqlite, the earliest ones will no longer exist. To overcome this see here:
If you are using FilePicker then this returns a contenturi which may not be readable by most extensions (because the contenturi needs to be converted to a file path).
My guess is that you perhaps needed to dig deeper with your debugging in order to check the file paths being returns and that the file actually exists.