lat4732's avatar
Level 12

Working with DigitalOcean Spaces & Laravel

Hey!

Currently the app is uploading photos in the storage folder, which photos are publicly accessible. We want to move to DO Spaces and I'm curious what's the difference in the code. Here's how the app upload photos now

$name = 'review_'. $insert; // $insert is the actual review ID
$format = "webp";
$media = Image::make($request->media)->encode('webp', 90)
Storage::disk('reviews_media')->put($name . '.' . $format, $media, 'public')

Will the code be completely different with DO Space? What to actually store as a media_path value? A link to the image in the DO space domain or what? I'm afraid I won't be able to make this work. Please, give me some tips.

0 likes
5 replies
krekas's avatar

@Laralex sorry I don't know how it works exactly. Just googled for you. You will have to try it yourself

1 like
lat4732's avatar
Level 12

And what about connecting through FTP to the DO Space? I can't make it work.. I'm connecting but either no files are displaying or I get some errors when trying to open a folder. I tried through FIleZilla (then I realized only FileZilla PRO can connect to s3), WinSCP (I see no folders), CyberDuck (I see 2 folders which aren't with the names that they should be). What to do?

Please or to participate in this conversation.