Hi @hsendel,
@Hiba_B has already helped you clear your doubts.
I remember from one of the challeges there was a nice way of downloading files: Advent Challenge #3 - #7 by SamiKiran
Study the cool solution from @Anna_Maziarz
In your case, you need to first get the url attribute from that file like icon and then use the approach from @Anna_Maziarz