firebase-storage

Changing profile photo using Firebase. Photo uploads successfully but the picture doesn't stay

廉价感情. 提交于 2020-08-10 20:20:13
问题 I've been following a tutorial on how to create a social app and I followed how to upload a post, but the tutorial didn't cover how to upload a new profile picture. So this is what I've been doing on my own. So far, I can select an image from my gallery and it sits in the photo placeholder, and then I press save, it says it was successful, but then I go to the profile page and there's no photo and when I go back to edit profile there's no photo there either. I looked at Firebase and saw that

Uploading multiple pdf files to Firebase storage - Android

半腔热情 提交于 2020-08-10 19:35:51
问题 I have an android app where user can upload multiple pdf files in a "folder". My app is working perfectly for uploading and viewing a single PDF file.To upload multiple files, I know I will have to use a for loop but I don't have any idea how to proceed. My code for uploading a single PDF is : StorageReference pdfRef = storageReference.child(fName + "/" + pdfName); pdfRef.putFile(pdfData) .addOnSuccessListener(new OnSuccessListener < UploadTask.TaskSnapshot > () { @Override public void

Why does my code that attempts to copy files from the root directory of Firebase Storage to a new folder not work?

99封情书 提交于 2020-08-10 19:16:14
问题 I am trying to copy or move files from the root in Firebase Storage to a folder. More specifically, from users/displayName/uid/ to users/displayName/uid/somefolder. I have read that there is no method in the Firebase Storage API to make a copy of a file that you've already uploaded and that you will have to download the data and re-upload it. I could not find any sample codes, however. Therefore, I have written the following code to try to accomplish that but it does not work. See the error

Speeding up firebase storage download

依然范特西╮ 提交于 2020-08-08 05:14:20
问题 I am trying to pull videos from firebase storage and put them into a slideshow on my Android app but the videos take so long to load. Does anyone have any alternatives or ways to speed up the data download? 回答1: One thing you can do is split your video in smaller chunks when you are uploading then download chunks one by one as slideshow plays. It is a good idea because by this way you or your user don't have to wait for whole file. you can start playing videos as soon as your first chunk is

Retrieve stored image from Firebase Storage

僤鯓⒐⒋嵵緔 提交于 2020-08-02 02:53:21
问题 I am trying to store and retrieve image by using Firebase. It is okay when storing an image, but I can't show it in an ImageView. It doesn't give an error so I can't understand where is the mistake. public class MainActivity extends AppCompatActivity { private Button btnSelectImage; private ImageView mImageView; private StorageReference mStorage; private static final int CAMERA_REQUEST_CODE = 1 ; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState)

Firebase security rules: “ruleset uses old version”, what is current version?

丶灬走出姿态 提交于 2020-07-22 06:06:49
问题 firebase --version 8.4.1 with Firebase init I created some files. Now firebase deploy is complaining about firebase.storage. The error message is: Ruleset uses old version (version [1]). Please update to the latest version (version [2]). What is wrong with it? firebase deploy deploying database, storage, firestore, functions, hosting database: checking rules syntax... database: rules syntax for database $db is valid firebase.storage: checking storage.rules for compilation errors... undefined

Firebase Storage - error with uploading png image via Python google-cloud-storage lib

懵懂的女人 提交于 2020-07-21 07:45:48
问题 I'm running web app based on Firebase Realtime Database and Firebase Storage. I need to upload new images to Firebase google bucket every hour via Python google-cloud-storage lib. Here are the docs. My code for image upload (img_src path is correct): bucket = storage.bucket() blob = bucket.blob(img_src) blob.upload_from_filename(filename=img_path, content_type='image/png') Image seem to be uploaded successfully, but when manually viewing it in Firebase Storage, it doesn't load. All the image

Firebase Storage - error with uploading png image via Python google-cloud-storage lib

我怕爱的太早我们不能终老 提交于 2020-07-21 07:45:09
问题 I'm running web app based on Firebase Realtime Database and Firebase Storage. I need to upload new images to Firebase google bucket every hour via Python google-cloud-storage lib. Here are the docs. My code for image upload (img_src path is correct): bucket = storage.bucket() blob = bucket.blob(img_src) blob.upload_from_filename(filename=img_path, content_type='image/png') Image seem to be uploaded successfully, but when manually viewing it in Firebase Storage, it doesn't load. All the image

Flutter web - Upload Image File to Firebase Storage

假装没事ソ 提交于 2020-07-18 04:45:08
问题 On flutter web, I pick an image file from the computer and get a File image object. Then I want to upload it to Firebase Storage. For Android and iOS versions of the app I was using a Firebase Cloud Function and an http multipart request. It worked, but for the web version of the app it doesn't. So, How can I upload an html image file to Firebase Storage, either directly or through a Cloud Function? 回答1: Finally I managed to find a solution to this issue. To achieve this I needed to install

Access url without token in Firebase Storage

六眼飞鱼酱① 提交于 2020-07-17 06:55:30
问题 I have a firebase storage download url, like https://firebasestorage.googleapis.com/v0/b/siren-5eee7.appspot.com/o/profile%2FC6jNlR0F4cZBPv7wF0REWUNVor33?alt=media&token=63a9130e-2ba6-4f38-ac3f-2231c54a1043 How can I access this url without token parameter? For example, If I access above url without token there will be 403 error showing permisson denied. My firebase storage secure rule is below : service firebase.storage { match /b/{bucket}/o { match /{allPaths=**} { allow read, write: if