does anyone have experience with DownloadResponse function? I need to download file and I’m not able to finish this task. Everything works fine except that the downloaded file size is 0 byte (there is download question).
not working code:
return = new DownloadResponse($node, ‘image/jpeg’);
this one is working well (showing image):
return = new FileDisplayResponse($node, Http::STATUS_OK, [‘Content-Type’ => ‘image/jpeg’]);
If I’m not wrong I have to fill this procedure just with filename+path and content type, I cant find information that I have to insert more info to this function.
Thank you in advance for any advise!