• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Tutorial for uploading of pictures and files

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • 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
 
Ranch Foreman
Posts: 376
4
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • 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: 41
  • Mark post as helpful
  • send pies
  • 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
Ranch Foreman
Posts: 376
4
Android Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes,it is the Uri,where you get from onActivityResult.
 
Ben van Jaarsveld
Ranch Hand
Posts: 41
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks... works amazingly...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!