public function saveFile()
{
$file = input(‘post.file’);//文件
$type = input(‘post.type’);//格式 1 音频 2 视频 3 图片
if (OSS_UPLOAD) { //oss上传
$name = ‘./uploads/uid’ . WID . ‘/wechat’;
f i l e p a t h = b a s e 6 4 c o n t e n t ( file_path = base64_content( filepath=base64content(file, n a m e , name, name,type);
if ($file_path) {
o b j e c t = ′ u i d ′ . W I D . ′ / a p p l e t / ′ . d a t e ( " Y m d " ) . ′ / ′ . c r e a t e U u i d ( ) . ′ . ′ . object = 'uid' . WID . '/applet/' . date("Ymd") . '/' . createUuid().'.'. object=′uid
上传base64格式处理方法(图片 视频 音频)
最新推荐文章于 2025-03-16 13:19:19 发布