lundi 29 juillet 2019

Uploading images to digital ocean spaces in Laravel

I'm trying to upload multiple images to digital ocean but I'm getting this error Error executing "PutObject" on "https://images.images.fra1.digitaloceanspaces.com/EunqNIu6mFjPTzJK4yksT5elaFqNQyfRMo9xzjG3.jpeg/EunqNIu6mFjPTzJK4yksT5elaFqNQyfR . How can I upload multiple images to digital ocean spaces?

I have set up everything in digital ocean.

   foreach ($request->photos as $photo) {
        $filename = $photo->hashName();
          Storage::disk('spaces')->putFile( $filename, $photo);

        ProductsPhoto::create([
            'product_id' => $product->id,
            'filename' => $filename
        ]);
     }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire