Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/refactor config local path #3329

Merged

Conversation

khacnha
Copy link
Contributor

@khacnha khacnha commented Aug 26, 2021

Proposal to improve the temporary_files->local_path configuration in the default config/excel.php file:
'temporary_files' => [

    /*
    |--------------------------------------------------------------------------
    | Local Temporary Path
    |--------------------------------------------------------------------------
    |
    | When exporting and importing files, we use a temporary file, before
    | storing reading or downloading. Here you can customize that path.
    |
    */
    'local_path'          => storage_path('framework/laravel-excel'),

]

because under the current configuration, there will be tmp files appearing in Git local changes.
i think we need to ignore it in git config.
And to make it simpler, I think I can change the path to put in the cache folder, it's quite reasonable.

We can change the light storage_path('framework/cache/laravel-excel') instead of storage_path('framework/laravel-excel')

  • Checked the codebase to ensure that your feature doesn't already exist.
  • Take note of the contributing guidelines.
  • Checked the pull requests to ensure that another person hasn't already submitted a fix.
  • Updated the changelog

Solve the problem already mentioned here: SpartnerNL#3260
Fix SpartnerNL#3260
Change default local_path configuration
@patrickbrouwers patrickbrouwers merged commit 0b7b379 into SpartnerNL:3.1 Aug 26, 2021
@patrickbrouwers
Copy link
Member

Thanks!

@anthonybourdon
Copy link

Hello,
changing default path alter application because /cache/laravel-excel with the mkdir command causes an error because the flag recursive is not to true in vendor/maatwebsite/excel/src/Files/TemporaryFileFactory.php:49

@patrickbrouwers
Copy link
Member

Best to create that folder yourself and give permissions on your sever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants