Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-existant image from AWS results in fatal error #90

Open
dwenaus opened this issue Sep 23, 2014 · 2 comments
Open

non-existant image from AWS results in fatal error #90

dwenaus opened this issue Sep 23, 2014 · 2 comments

Comments

@dwenaus
Copy link

dwenaus commented Sep 23, 2014

when trying to attach an image that does not exist, (ie. http://prod.retreat.guru.s3-us-west-2.amazonaws.com/no-image.jpg). I get a fatal error. I'm guessing this is because AWS returns an XML error rather than a 404 error. So Stapler thinks it's a valid image and 'downloads' it. but then MimeTypeGuesser fails.

here is the error:
ERROR: exception 'Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException' with message 'The file "/tmp/291239.jpg" does not exist' in /vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php:115
Stack trace:
#0 /vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php(87): Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser->guess('/var/folders/49...')
#1 /vendor/codesleeve/stapler/src/Codesleeve/Stapler/File/File.php(32): Symfony\Component\HttpFoundation\File\File->getMimeType()
#2 /vendor/codesleeve/stapler/src/Codesleeve/Stapler/Attachment.php(512): Codesleeve\Stapler\File\File->isImage()
#3 /vendor/codesleeve/stapler/src/Codesleeve/Stapler/Attachment.php(478): Codesleeve\Stapler\Attachment->flushWrites()
#4 /vendor/codesleeve/stapler/src/Codesleeve/Stapler/Attachment.php(417): Codesleeve\Stapler\Attachment->save()
#5 /vendor/codesleeve/stapler/src/Codesleeve/Stapler/ORM/EloquentTrait.php(58): Codesleeve\Stapler\Attachment->afterSave(Object(RetreatGuru\Teacher))
#6 [internal function]: RetreatGuru\Teacher::Codesleeve\Stapler\ORM{closure}(Object(RetreatGuru\Teacher))
#7 /vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(199): call_user_func_array(Object(Closure), Array)
#8 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1564): Illuminate\Events\Dispatcher->fire('eloquent.saved:...', Object(RetreatGuru\Teacher))
#9 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1411): Illuminate\Database\Eloquent\Model->fireModelEvent('saved', false)
#10 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1398): Illuminate\Database\Eloquent\Model->finishSave(Array)
#11 /app/commands/ImportCommand.php(265): Illuminate\Database\Eloquent\Model->save()

@tabennett
Copy link
Contributor

Are you still having this issue? I don't quite understand what you mean when you say 'Trying to attach an image that doesn't exist.'. Are you attempting to grab an existing image from an S3 bucket and re-upload it?

@dwenaus
Copy link
Author

dwenaus commented Nov 18, 2014

no, I no longer have this issue. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants