N
N
Nikita Pogudalov2019-03-24 20:16:32
Java
Nikita Pogudalov, 2019-03-24 20:16:32

How to upload txt file to firebase?

I have a txt file in the assets folder. How can I upload this file to FireBase Storage? I know the picture as but the file is not)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alexandrovich, 2019-03-26
@DragonNP

so what's the difference between uploading a photo and uploading a file? I won't tell you about Android, but about the web
var metadata = {
contentType: 'image/jpeg',
};
var uploadTask = storageRef.child('images/mountains.jpg').put(file, metadata);
change contentType to what you want and it should work. I think that in android it should be similar

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question