I am new to rjxs programming so wondering how can I do the following.
const downloadUrls$: any = filelist.map((file: any) => {
const fileName = ...
const path = ...
const fileRef = ....
const task: any = ...
// get notified when the download URL is available
return task.snapshotChanges().pipe(
filter(snap => snap.state === TaskState.SUCCESS),
switchMap(() => from(fileRef.getDownloadURL()))
);
});
So in the above code instead of doing from(fileRef.getDownloadURL())
is there is a way I can do create a object like below and the return will be a list of below objects.
from (
{
name: fileName,
filepath: fileRef.getDownloadURL(),
relativePath: path
}
)
Method signature
`.getDownloadURL(): Observable<any>`