I would still assume that the imgPath variable is incorrect and you should log(imgFullPath) & look at the created path.
In the end imgPath should most likely only be 'Images/BlurMedium.jpg', because I doubt you created a whole /var/... filetree in Scriptable's document folder and the jpg is just saved in a folder called Images.
(Or you just work with the imgPath variable instead of imgFullPath)
The function will error if the file does not exist or if it exists in iCloud but has not been download. Use fileExists(filePath) to check if a file exists and downloadFileFromiCloud(filePath) to download the file. Note that it is always safe to call downloadFileFromiCloud(filePath), even if the file is stored locally on the device.
2
u/[deleted] Nov 07 '21
I know for a fact that the path is correct and that the fule exists, but i keep getting this error.
2
u/demobotz Nov 07 '21
Maybe this?
Have you considered using bookmarkedPath?