👉 Enroll now for the full course → www.udemy.com/course/authentication-authorization-security-the-complete-guide/?couponCode=ATYT-80OFF-DEC24 USE 80% OFF COUPON: ATYT-80OFF-DEC24 (VALID UNTIL Dec 31st 2024)
Hey Shucky, When you upload a file to Firebase Storage, you can provide metadata properties such as the cacheControl. This property will be used to cache the file based on your specification. You can do something like this: var metadata = { 'contentType': file.type, 'cacheControl': 'private, max-age=15552000' }; ref.child(name).put(file, metadata) For more: firebase.google.com/docs/storage/web/file-metadata#update_file_metadata Cheers!
Thank you for this. I was wondering, is there a way to set a maximum file size for the image? And how do we know if the user uploads a .jpg image. What if it's a -png image, then it will still get the .jpg extension in your example. Is there any way to check the file type and upload the file with the correct extension. And can we somehow make sure, that the user is uploading an image and not some other type of file?
does this script work as well for any other files (like video?). I have made the functionality with react for uploading images, but now i am wondering if I can use the same principle for uploading videos. Thanks
Still a great video, and I learned quite a bit. Fair warning though... the source code in the repository below is helpful, but it is much different than it was when the video was recorded. There is utility in finding what has changed and what needs to be adjusted to make the project work. Thank you SoftAuthor for making this tutorial.
👉 Enroll now for the full course → www.udemy.com/course/authentication-authorization-security-the-complete-guide/?couponCode=ATYT-80OFF-DEC24
USE 80% OFF COUPON: ATYT-80OFF-DEC24
(VALID UNTIL Dec 31st 2024)
Nice content! Very explained and a very straight forward handling tool
Thank you 🙏
really well paced, spoken and clearly explained 👍 thank you!
You're very welcome!
awesome video very straight forward and im very very gratefull for subtitle
Thanks a bunch! Please subscribe it to the channel for more videos like this if you've not already! Thanks
it was so helpful
Thank you so much!
Please subscribe if you’ve not already to get videos like this!
Cheers!
Great video. I am curious if there are any best practices around caching the profile images in order to minimize the storage bandwidth costs?
Hey Shucky,
When you upload a file to Firebase Storage, you can provide metadata properties such as the cacheControl. This property will be used to cache the file based on your specification.
You can do something like this:
var metadata = {
'contentType': file.type,
'cacheControl': 'private, max-age=15552000'
};
ref.child(name).put(file, metadata)
For more:
firebase.google.com/docs/storage/web/file-metadata#update_file_metadata
Cheers!
@@SoftAuthor thank you very much!
Good comprehensive tutorial.
Thank you Ruth!
@@SoftAuthor You're heartily welcome, SoftAuthor.
Really helpful video sir
You make the best firebase on firebase cloud storage .
Thank you!
user information how to show like username, join date, cityname, country, etc text,
Great job 👏👏
Thank you!
Just what I was looking for. Thanks much!
Glad I could help!
Thank you for this. I was wondering, is there a way to set a maximum file size for the image? And how do we know if the user uploads a .jpg image. What if it's a -png image, then it will still get the .jpg extension in your example. Is there any way to check the file type and upload the file with the correct extension. And can we somehow make sure, that the user is uploading an image and not some other type of file?
Those are great questions and I would love to create content around those. Stay tuned!
Thanks bro u r my hero
You’re welcome!
Excellent! Thank you!
João César Lima You’re welcome! :)
Thank you so much!
You’re welcome!
Thanks for this great vid. Isn't there any way to add display name to the newly created user in firebase?
Yes you can get display name using firebase.auth().currentUser.displayName
Thank you so much!
Please subscribe if you’ve not already to get videos like this!
Cheers!
does this script work as well for any other files (like video?). I have made the functionality with react for uploading images, but now i am wondering if I can use the same principle for uploading videos. Thanks
Is there any way to save the photo with an email path instead of uid so it is easier to retrieve the information
Use user.email instead of user.uid
@@zuhairabbasabidi2992 thank you I will try it out
@@zuhairabbasabidi2992 this doesn't work for me. once I press sign up it doesn't save the folder as the user email
@@louismastbooms5048
storageRef = storage.ref('users/' + user.email + '/profile.jpg')
console.log user.email to check you're getting email correctly. Notice / in ref.
You are Amazing.
Can you please add a link to the github repo of this code?
Hey, you can find the source code link at the bottom of the article in the description of the video. Cheers!
nd really nice tutorial...
Thanks!
Please make more videos on firebase thanks.
Will do! :)
thank you give me tons of gold
You're welcome Yudhi! :)
Make a video on signup, login and realtime user data with Firebase.🙏
Will do when I get a chance! Thank you for the suggestion!
please give me the source code
Here you go!
github.com/softauthor/firebase-storage
@@SoftAuthor thanksssss
You’re welcome :)
@@SoftAuthor thank you!!
Still a great video, and I learned quite a bit. Fair warning though... the source code in the repository below is helpful, but it is much different than it was when the video was recorded. There is utility in finding what has changed and what needs to be adjusted to make the project work. Thank you SoftAuthor for making this tutorial.
Try Check This in 2021 but no work anymore.
What type of error were you getting?
👍