Controller @PostMapping("/save") public R save(@RequestBody ShareEntity share){ OSSClient oss = new OSSClient(GlobalConfig.domain, GlobalConfig.AccessKeyID,GlobalConfig.AccessKeySecret); InputStream inputStream1; String[] shartimg = new String[2
using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Net; using System.Net.Security; using System.Security.Cryptography.X509Certifi
Thinkphp3.2整合阿里云OSS图片上传实例,图片上传至OSS可减少服务器压力,节省宽带,安全又稳定,阿里云OSS对于做负载均衡非常方便,不用传到各个服务器了 首先引入阿里云OSS类库 <?php namespace Home\Controller; use Think\Controller; use OSS\Core\OssException; vendor('aliyun.autoload'); 上传图片自己写,上传成功到阿里云后,删除临时文件 function a
调用实例 require("ZZBase64") local files local file = io.open("E:\\2342.jpg","rb") if file then print "发现文件" files = file:read("*a") file:close() else print "没有找到文件" end --图片转成base64文本 print(ZZBase64