- 🇮🇳India anil280988
I faced the similar issue,and even log shows that file can't be copied from tmp folder to public/private folder. But looking at the code I found that it's the generic error message that is shown when file can't be created. In my case the issue was the file name format, I was adding timestamp token at the end and it has spaces. Removing that I was able to create the file.
- 🇬🇧United Kingdom kewesley
We had a similar issue to #5 where a non-admin user could not download an export in the private files directory, which we fixed by implementing a separate hook in one of our custom modules. I wonder if the regex is overcomplicating things? We are using
$file->getOwnerId()
to determine who created the export.use Drupal\Core\Access\AccessResult; use Drupal\Core\Session\AccountInterface; use Drupal\file\FileInterface; function MYMODULE_file_access(FileInterface $file, $operation, AccountInterface $account) { // Allow access to temporary private file exports. if ($operation === 'download' && $file->isTemporary() && str_contains($file->getFileUri(), '://views_data_export/')) { if ($file->getOwnerId() === $account->id()) { return AccessResult::allowed(); } } return AccessResult::neutral(); }
- 🇺🇦Ukraine vasyok
Hello guess.
How can you think its really possible to place exported file in file system?I choose filename
Change export method to Batch
But nothing happen. This Initializing line doesn't grow.