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

Add option to ignore storage folder structrue in added files #73

Merged
merged 2 commits into from
Jul 6, 2022

Conversation

pelmered
Copy link
Contributor

@pelmered pelmered commented Jul 6, 2022

When you add a file the directory structure of that file is kept in the resulting zip file.

For example if I want to add a file with the path path/to/my/file.png and I add it with $personalData->addFile('path/to/my/file.png', 'disk_name', 'images');, the file be saved in this location: temp-dir/images/path/to/my/file.png.
I want the file to end up in temp-dir/images/file.png and not reveal my directory structure in the export file.

Adding 'keep_directory_structure' => false, to the config file will add this behavior. Leaving it as true(the default) will keep the old behavior.

@freekmurze freekmurze merged commit 49db4b7 into spatie:main Jul 6, 2022
@freekmurze
Copy link
Member

Thanks!

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

2 participants