Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Error uploading files when using a port on the URL #10

Closed
laraning opened this issue Jan 8, 2019 · 3 comments
Closed

Error uploading files when using a port on the URL #10

laraning opened this issue Jan 8, 2019 · 3 comments

Comments

@laraning
Copy link

laraning commented Jan 8, 2019

Hi,

Great work first of all! Congratulations!

The issue is simple: If I use a port on the url, on my case "localhost:8000" the "link" value on the returned ajax json called from the "nova-vendor/froala-field/posts/attachments/body" doesn't show the url.

Steps to reproduce:

Start a webserver with a port. You can use the default 8000 when running "php artisan serve".

Try to upload an image:
image

Then you can see the "link" value is wrong:
image

I dug up the code and the StorePendingAttachment class looks like it's working correctly. Still, the line:
Storage::disk($this->field->disk)->url($attachment)
is not showing the right url somehow ...

Hope it helps!
Bruno.

@slavarazum
Copy link
Collaborator

Hi. Thanks for the feedback!

Did you setup a url option in your filesystem config correctly?

Like this: 'url' => env('APP_URL').'/storage'

@laraning
Copy link
Author

laraning commented Jan 9, 2019

You're right, sorry for that.

the url() methods fetches the app.url configuration parameter and not a dynamically constructed given the url passed in the browser. Sorry, my mistake, thanks for the help!

Bruno

@laraning laraning closed this as completed Jan 9, 2019
@slavarazum
Copy link
Collaborator

You are welcome

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

No branches or pull requests

2 participants