How to unlock the file after AWS S3 Helper uploading file?

前端 未结 4 432
猫巷女王i
猫巷女王i 2021-01-04 06:36

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

4条回答
  •  一向
    一向 (楼主)
    2021-01-04 07:08

    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.

提交回复
热议问题