I am using the official PHP SDK with the official service provider for laravel to upload an image to Amazon S3. The image is temporarily stored on my server and should be de
I'm not a PHP guy, but I'd try popping that bad boy into a stream and then passing the stream to the SDK.
That way, you can explicitly close the stream and then delete the temp file. You may even be able to eliminate the temporary file altogether and deal solely with streams, if that's allowed by your specific use-case.
Looks like this SO post might set you on the right track.