Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

firebase - FlutterFirebase Is it possible to add text data about photo and photo?

I got confused in this situation. Im working on a new project like adding photo and description or other text input. I read a article it is doing this but it's old article. My app like this; user will add a photo, title and description. Just like a simple Instagram. (Honestly Im not gonna do instagram. :] )

(Also you can find it here: https://fireship.io/lessons/flutter-slider-like-reflectly/.)

Is it possible to do that in Firebase Firestore ? Or should i use Cloud Storage?

If I have to use Cloud Storage, how can I add photo description or other text input.

I couldn't find any example like this in Google.

question from:https://stackoverflow.com/questions/65860344/flutterfirebase-is-it-possible-to-add-text-data-about-photo-and-photo

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For a user to upload images to your app you would need something like Firebase Storage to host the images, so you will need Cloud Storage anyways. regarding the description, its possible to attach custom metadata to files in Cloud Storage (description, location, title etc...) However if you are going for something more complex, using Firestore together with Storage is probably your best bet. You could store a document for each image in an image collection in firestore and have the imageUrl field point to the Hosting URL along with any other data you might want


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...