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

Storage:link to Public #15

Closed
collectiveconscious opened this issue Dec 18, 2019 · 7 comments
Closed

Storage:link to Public #15

collectiveconscious opened this issue Dec 18, 2019 · 7 comments

Comments

@collectiveconscious
Copy link

Hi there,

When I upload the file goes to storage/domain/app/public. I tried to create a symlink for this directory but it says. public/storage already exists for default linking.

I used php artisan storage:link --domain=domain-address

How do I create a symlink for each domain?
or
How do I use the default storage directory for all domains?

Regards,
Bilal Younas

@collectiveconscious collectiveconscious changed the title Storage:link to Puclic Storage:link to Public Dec 18, 2019
@gecche
Copy link
Owner

gecche commented Dec 18, 2019

Hi,

due to the behavior of the storage:link command in Laravel, that command write always the same link name, so, to date, you have to do symbolic manually if you want to target a different folder for each domain. I hope in future Laravel versions they update the command allowing to choose a custom link name (I will try to do a pull request when I have time)

I close the issue as this is already discussed: please refer to #11 for further details.

Cheers,

Giacomo

@gecche gecche closed this as completed Dec 18, 2019
@collectiveconscious
Copy link
Author

what if I don't want to use the domain/storage path. I want to use the laravel default public path for all domains.

How would I go about that in domains.php?

@collectiveconscious
Copy link
Author

The other article does not help me much

@collectiveconscious
Copy link
Author

image
I tried this, but no effect.

@gecche
Copy link
Owner

gecche commented Dec 19, 2019

Hi,

I'm not sure to understand your point, but if you want to target the same folder from each domain, you must not use storage_path because my package override that function targeting the storage folder of each domain.
I think you might use, for example, base_path('storage/app/public')

I don't know if this helps

Cheers

Giacomo

@collectiveconscious
Copy link
Author

Okay

@collectiveconscious
Copy link
Author

Great I created a separate disk and gave its root base_path('storage/app/public'). Now everything is good.

Thanks & Regards,
Bilal Younas

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

No branches or pull requests

2 participants