In AddPhotoPage.qml, function resizeImage() at 199 row,
var fileInfo = AppFramework.fileInfo(path);
if (!fileInfo.exists) { ...
this returns: qml: Image not found: file:///C:/Users/someuser/ArcGIS/AppStudio/Data/Pictures/IMG_1659523701346.jpg,
but the image exists, and (path) is valid. Further no resizeImage occurs, so when you make photos from the camera, they are not resized.
Tested on windows and android...
Please let me know how to fix it,
Regards!
Solved! Go to Solution.
Resolved:
As DocumentDialog, choosing from files, also do not resize images, I replace at 161:
var attachedFilePath = filePrefix + attachmentsFolder.path + "/"+ attachmentfileInfo.displayName
with
var attachedFilePath = attachmentsFolder.path + "/"+ attachmentfileInfo.displayName
and below 163 add:
app.selectedImageFilePath = attachedFilePath
var path = AppFramework.resolvedPath(app.selectedImageFilePath)
resizeImage(path)
So now the app resize images, choosing from files, further simply copy ready DocumentDialog code to CameraDialog section, replacing its code, and that's all. Now images are resized if they come from camera. Further testing, and if any issues will report here.
Regards
Resolved:
As DocumentDialog, choosing from files, also do not resize images, I replace at 161:
var attachedFilePath = filePrefix + attachmentsFolder.path + "/"+ attachmentfileInfo.displayName
with
var attachedFilePath = attachmentsFolder.path + "/"+ attachmentfileInfo.displayName
and below 163 add:
app.selectedImageFilePath = attachedFilePath
var path = AppFramework.resolvedPath(app.selectedImageFilePath)
resizeImage(path)
So now the app resize images, choosing from files, further simply copy ready DocumentDialog code to CameraDialog section, replacing its code, and that's all. Now images are resized if they come from camera. Further testing, and if any issues will report here.
Regards