问题描述:

I want to store user's profile picture on Firebase storage.

My Firebase database structure is like below.

users

ㄴ KXkVAYQOV92tW27Wk0C

ㄴ uid: "EAGZwcgvgAcgErO7rfm7IHI91fk2"

ㄴ sex: "F"

ㄴ age: 24

ㄴ KXkVR1rc2riXyGFl69E

ㄴ uid: "alE4qM1vg2c9OrW5lVo7IvQk02Hv"

ㄴ sex: "M"

ㄴ age: 21

And now I'm wondering how my Firebase storage file structure should be.

Idea 1:

images

ㄴ users

ㄴ EAGZwcgvgAcgErO7rfm7IHI91fk2

ㄴ profile.png

ㄴ something.png

ㄴ alE4qM1vg2c9OrW5lVo7IvQk02Hv

ㄴ profile.png

ㄴ something.png

Idea 2:

images

ㄴ profile

ㄴ EAGZwcgvgAcgErO7rfm7IHI91fk2.png

ㄴ alE4qM1vg2c9OrW5lVo7IvQk02Hv.png

ㄴ something

ㄴ EAGZwcgvgAcgErO7rfm7IHI91fk2.png

ㄴ alE4qM1vg2c9OrW5lVo7IvQk02Hv.png

Which one is best practice for Firebase storage in performance and usability?

Any advice would be thankful !

Edit:

As Lirianer's comment, Database should looks like below.

users

ㄴ EAGZwcgvgAcgErO7rfm7IHI91fk2

ㄴ sex: "F"

ㄴ age: 24

ㄴ alE4qM1vg2c9OrW5lVo7IvQk02Hv

ㄴ sex: "M"

ㄴ age: 21

相关阅读:
Top