I cannot get this to work only using ``$contentDocument->getContentAsString()``. I tried creating a ``tmpfile``, and then get the uri from the resource and pass that as filename to the BinaryFileResponse. Unfortunately the file is lost somewhere before ``BinaryFileResponse::prepare``. I think it is also less safe to store a file temporily before sending it. If a fatal error happens it is fe. not removed.

Maybe better to not support it for the moment.