• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tutorial for uploading of pictures and files

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

can anyone please assist with a tutorial to upload picture and files to Firebase Storage...

I have looked at a couple of tutorials but I find them very murky and struggle to get far...

in my project, I take a picture... and load it to an ImageView: com.theartofdev.edmodo.cropper.CropImageView

so it displays in the app but I don't want to store it to the phone storage, I want it to be uploaded straight to the Firebase Storage... so far I haven't been able to find a tut that could help me...

any suggestions???


Thanks
 
Rancher
Posts: 665
10
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about this?
https://code.tutsplus.com/tutorials/image-upload-to-firebase-in-android-application--cms-29934

I been using this tutorial for one of my project, and it worked.

Also, don't forget to setup Firebase permission
 
Ben van Jaarsveld
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Randy

Thank you for you reply... This was the last one that I followed...

I got stuck... the code says:

So I need a filepath.... ???

So if I run my app and I display the URI in the image file... in my log, I get a path:  

file:///data/user/0/com.benvanj.hhr/cache/cropped6991231937077350946.jpg



Will this be the filepath that they are looking for?
 
Randy Tong
Rancher
Posts: 665
10
Android Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes,it is the Uri,where you get from onActivityResult.
 
Ben van Jaarsveld
Ranch Hand
Posts: 57
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks... works amazingly...
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic