kriswallsmith / assetic

Asset Management for PHP
MIT License
3.75k stars 555 forks source link

Issue with dumping assets to AWS S3 #714

Open ZaphodBBX opened 9 years ago

ZaphodBBX commented 9 years ago

Hello, I'm using assetic with Symfony2. We want to use to the AWS S3 for storing assets. The setup is like this: http://www.symfony.club/symfony2-deploying-assets-to-cdn/ using the S3 StreamWapper service.

Assets:install works perfectly and all the files are copied to the S3 bucket.

But when using Assetic, I run into an issue: joshua@Orion:/var/www/Sirius$ php app/console assetic:dump -e=prod Dumping all =prod assets. Debug mode is off.

12:34:38 [dir+] s3://sirius-assets/css 12:34:38 [file+] s3://sirius-assets/css/8599eb6.css 12:34:38 [dir+] s3://sirius-assets/images 12:34:38 [file+] s3://sirius-assets/images/00fc14d.png 12:34:38 [dir+] s3://sirius-assets/images

[RuntimeException]
Unable to create directory s3://sirius-assets/images

The first 2 assets are uploaded perfectly, but the problem arises with the second image, for some reason assetic tries to create a new 'images' folder, which already exists, and then fails...

EDIT: I found a simple solution: Use Assetic to dump local first and then copy them to AWS using their SDK Streamwrapper

shehi commented 9 years ago

@kriswallsmith : I believe issues like this should be closed as they reached resolution.