是否在 php 中构建了正确的表单了呢? <?php $bucket = 'youbucket'; /// 空间名 $form_api_secret = 'yourapisecret'; $options = array(); $options['bucket'] = $bucket; /// 空间名 $options['expiration'] = time()+600; /// 授权过期时间 $options['save-key'] = '/{filename}{.suffix}'; $policy = base64_encode(json_encode($options)); $sign = md5($policy.'&'.$form_api_secret); ?> <form action="http://v0.api.upyun.com/<?php echo $bucket?>/" method="post" enctype="Multipart/form-data"> <input type="hidden" name="policy" value="<?php echo $policy?>"> <input type="hidden" name="signature" value="<?php echo $sign?>"> <input type="file" name="file"> <input type="submit"> </form>
是否在 php 中构建了正确的表单了呢?