You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.
Sorry for my bad english , first i don't know where to post this issue looking for help , i tried my best with no luck , the issue i have when i send images to Firebase storage it's keep loading and doesn't show anything and all the images size the same "15 b". It gives me empty images and when I try to open the download URL, it show nothing.
`function uploadPicture(options) {
$cordovaCamera.getPicture(options).then(function (sourcePath) {
var sourceDirectory = sourcePath.substring(0, sourcePath.lastIndexOf('/') + 1);
var sourceFileName = sourcePath.substring(sourcePath.lastIndexOf('/') + 1, sourcePath.length);
sourceFileName = sourceFileName.split('?')[0];
$cordovaFile.copyFile(sourceDirectory, sourceFileName, cordova.file.dataDirectory, sourceFileName)
.then(function (success) {
$scope.uploadedImage = cordova.file.dataDirectory + sourceFileName;
// success - get blob data
var imageBlob = new Blob([success], { type: "image/png" });
alert (sourceFileName)
return saveToFirebase(imageBlob, sourceFileName);
}).then(function (_responseSnapshot) {
// we have the information on the image we saved, now
// let's save it in the realtime database
return saveReferenceInDatabase(_responseSnapshot)
}, function (error) {
alert(error);
});
}, function (err) {
alert(err);
});
};`
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Sorry for my bad english , first i don't know where to post this issue looking for help , i tried my best with no luck , the issue i have when i send images to Firebase storage it's keep loading and doesn't show anything and all the images size the same "15 b". It gives me empty images and when I try to open the download URL, it show nothing.
`function uploadPicture(options) {
$cordovaCamera.getPicture(options).then(function (sourcePath) {
var sourceDirectory = sourcePath.substring(0, sourcePath.lastIndexOf('/') + 1);
var sourceFileName = sourcePath.substring(sourcePath.lastIndexOf('/') + 1, sourcePath.length);
sourceFileName = sourceFileName.split('?')[0];
$cordovaFile.copyFile(sourceDirectory, sourceFileName, cordova.file.dataDirectory, sourceFileName)
.then(function (success) {
$scope.uploadedImage = cordova.file.dataDirectory + sourceFileName;
// success - get blob data
var imageBlob = new Blob([success], { type: "image/png" });
alert (sourceFileName)
return saveToFirebase(imageBlob, sourceFileName);
}).then(function (_responseSnapshot) {
// we have the information on the image we saved, now
// let's save it in the realtime database
return saveReferenceInDatabase(_responseSnapshot)
}, function (err) {
alert(err);
});
};`
The text was updated successfully, but these errors were encountered: