consatan/weibo_image_uploader

重试上传时抛出 InvalidArgumentException 异常

Closed this issue · 0 comments

当 cookie 失效或者其他原因导致上传失败时,会自动进行重登入操作,然后再 尝试一次 上传

由于 GuzzleHttp 会在上传完毕后将上传的资源销毁
这将导致第二次上传时 $option['multipart'][0]['contents'] 变量为被 fclose()resource

<?php
$file = fopen('php://temp', 'r');
echo gettype($file); // resource

fclose($file);
echo gettype($file); // unknow type