Laravel api attached volume not working
fcaceres98
HOBBYOP

a year ago

I attached a Volume to my service #275c8ba3-ba27-4ea3-ab4d-b9ef8dfb135c name=feisty-simplicity

In the api I use php artisan storage:link and to upload images I use:

$file = $request->file('image');
$path = $file->storeAs('public/urnas/', $FileName);

The volume path is = /public/urnas/

But everytime I deploy my service all images are not loading but the volume graph shows that something was uploaded.

I dont now if Iam missing something this is the first time I use a volume on railway, thanks in advance.

Solved

10 Replies

a year ago

@root what path is the writable path?


a year ago

should be /app/storage


a year ago

so thats where you should mount the volume


fcaceres98
HOBBYOP

a year ago

This is my local proyect

1346948864892207400


a year ago

Exactly, so mount the volume on railway under /app/storage - your app is in the container under /app, so any subdirectories would be under that


fcaceres98
HOBBYOP

a year ago

I will test that right now


fcaceres98
HOBBYOP

a year ago

Hi @root and @Brody, "/app/storage" - It worked! Thank you for the quick response.


a year ago

no problem!


a year ago

feel free to mark as solved aleks


a year ago

!s


Status changed to Solved aleks 12 months ago


Loading...