Added metadata for uploaded images, added confirmation log for the firebase function

This commit is contained in:
Mariano Uvalle 2019-04-07 18:32:32 -05:00
parent 6865399151
commit f438df4432
2 changed files with 5 additions and 1 deletions

View file

@ -32,7 +32,10 @@ class FirebaseStorageProvider {
final String fileId = _uuid.v1();
final StorageReference fileReference =
_storage.child('$folder$fileId.$type');
return fileReference.putFile(file);
return fileReference.putFile(
file,
StorageMetadata(contentType: 'image'),
);
}
/// Deletes a file from the firebase storage bucket given its path.