[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/22915
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind