[BUGFIX] Storage is offline but is still used

Check before generating a publicUrl if storage is online.

Resolves: #49842
Releases: 6.2, 6.1, 6.0
Change-Id: I766e337cf5e7dfcb309bbce0bbd7c4d8df733c84
Reviewed-on: https://review.typo3.org/23233
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel