DigitalOcean Spaces with Laravel

An overview of how to use DigitalOcean Spaces (Object Storage) with Laravel. We build an app that uploads to our local file storage, then setup DigitalOcean Spaces to upload files to the cloud.

GitHub repo: https://github.com/drehimself/laravel-spaces-example

# LINKS
My courses: https://codewithdre.com
Sign up for my newsletter: http://andremadarang.com/newsletter
My website: http://andremadarang.com
Twitter: http://twitter.com/drehimself
GitHub: http://github.com/drehimself
CodePen: http://codepen.io/drehimself

Comments

Hamid Hosseini says:

This doesn’t work. Laravel keeps saying “Endpoints must be full URIs and include a scheme and host”

Kamran Hossain says:

Thanks, Andre. I am searching a video like this. There is one question. Do I need to put the driver name s3 for DigitalOcean Spaces? Will I need an AWS s3 account or any connection with Amazon for this?

Pablo Torres says:

Hi Andre, I hope you can help me out…
To upload this works…

$imaged_card = Image::make($image_card_original_name)
->resize(100, 60)
->encode(‘jpg’, 80);
Storage::put(
‘images/article-one’,
$imaged_card->__toString(),
‘public’
);

But trying deleting a file or folder DigitalOcean is not happy. I guess I have to pass something like the ‘permission’, any suggestion?
Storage::deleteDirectory(
$directory
);

Thanks…

Bernard Onigbinde says:

Best and simplest laravel file upload video I’ve ever seen. Also helped me set up spaces. 😉
This helped me so so so much! Thanks a million!

Michael S says:

Wow thank you, i have learned so much from your tutorials, i have a question let say you setup a task scheduler and the image delete once a week. Does the image delete from digital ocean as well?

codegeek1001 says:

Thx. This helped a lot. Any tips on how to set CORS response headers to access the file through an xhr request from a different domain ?

peti ibhuzah says:

this is what i wanted thanks so much please make the full project

Write a comment

*

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles   Show Cars   Motorbikes   Scooters   Rims & Tires   Luxury BoatsFashion   Sunglasses   Luxury Watches   Luxury Purses   Jeans Wear   High Heels   Perfumes   Jewellery   Cosmetics   Shaving Helpers   Fashion HatsFooding   Chef Club   Fooding Helpers   Coktails & LiquorsSports   Sport Shoes   Fitness & Detox   Golf Gear   Racquets   Diving Equipment   Ski Gear   Snowboards   Surf Boards   Rollers & SkatesEntertainment   DIY Guides   Zik Instruments   Published Books   Music Albums   Cine Movies   Trading Helpers   Make Money   Fishing Equipment   Paintball Supplies   Trading Card Games   Telescopes   Knives   VapesHigh Tech   Flat Screens   Tech Devices   Camera Lenses   Printers   USB Devices   PC Hardware   Network Gear   Cloud Servers   Software Helpers   Programmer Helpers   Mobile Apps   Hearing AidsHome   Home Furniture   Home Appliances   Beddings   Floor Layings   Barbecues   Aquarium Gear   Safe Boxes   Office Supplies   Security Locks   Cleaning ProductsKids   Baby Strollers   Child Car Seats   Remote ControlledTravel   Luggages & Bags   Airlines Seats   Hotel Rooms   Fun Trips   Cruise Ships   Mexico Tours