0
갤러리에서 이미지를 가져오고 Sqlite에 이미지 이름을 저장했습니다.이미지가 삭제 된 양식 tmp 폴더가 닫힌 경우
var options = {quality: 75,
destinationType : Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
allowEdit: true,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 300,
targetHeight: 300,
popoverOptions: CameraPopoverOptions,
saveToPhotoAlbum: true
};
$cordovaCamera.getPicture(options).then(function (imageData) {
$scope.ChooseImage = imageData;
}
이미지 이름을 Sqlite에 저장 한 후 페이지를 다시로드 한 다음 Sqlite에서 이미지 이름을 가져옵니다. 그것은 잘 작동하고
var imageGetting = "select * from images_details where taskId='"+$scope.unquid+"'";
$cordovaSQLite.execute(db, imageGetting).then(function(data) {
var GetAllImages = data.rows.length;
for(i=0;i<GetAllImages;i++){
debugger;
$scope.images.push(cordova.file.tempDirectory + data.rows.item(i).imageUrl);
debugger;
}
}
하지만 우리는 응용 프로그램을 닫을 때 TMP 폴더 데이터는 사라질 것입니다, 그래서 우리는 이미지를 표시 할 수 없습니다 : 우리는 cordova.file.tempDirectory
에 추가 할 수 있습니다. tmpfile이 삭제 된 경우에도 이미지를 보여줄 수있는 대안이 있습니까?