I trying to build an export function for node.
This function needs to export a node's data with a field's data as an Excel file and attached files as a tar.gz file.
I'm using addModify of ArchiveTar.
The function fails when the passed file_uri have a white space in the filename.
Refer the following code
$archive = new ArchiveTar($tmp_path, 'gz');
$archive->addModify('/opt/web/sites/default/files/2019-08/good Holidays_4_0.pdf', 'Tender', '/opt/web/sites/default/files/2019-08/');
$response = new Response(file_get_contents($tmp_path));
$response->headers->set('Content-Type', 'tar.gz');
$response->headers->set('Content-Disposition', 'attachment; filename=' . $filename . '.tar.gz');
return $response;
Comments
Comment #2
rahulmon johnsonComment #3
cilefen commentedComment #8
cilefen commentedI am closing this support request because there have been no recent comments.
The Drupal Core issue queue is not the ideal place for support requests. Consider other sources of support.