h5upload.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. return [
  3. 'type_dev' => 'admin',//上传驱动
  4. 'ali' => [
  5. // 端口设置
  6. 'endpoint' => env('ALIYUN_OSS_ENDPOINT'),
  7. 'bucket' => env('ALIYUN_OSS_BUCKET'),
  8. 'bucket_private' => env('ALIYUN_OSS_BUCKET_PRIVATE'),
  9. // Access Key
  10. 'access_key' => env('ALIYUN_OSS_ACCESS_KEY'),
  11. 'access_secret' => env('ALIYUN_OSS_ACCESS_SECRET'),
  12. //sts
  13. 'sts_ram' => env('ALIYUN_STS_RAM'),
  14. 'sts_endpoint' => env('ALIYUN_STS_ENDPOINT'),
  15. 'sts_region_id' => env('ALIYUN_STS_REGION_ID'),
  16. //域名
  17. 'public_domain' => env('ALIYUN_OSS_PUBLIC_DOMAIN'),
  18. 'private_domain' => env('ALIYUN_OSS_PRIVATE_DOMAIN'),
  19. 'domain' => env('ALIYUN_OSS_DOMAIN'),
  20. // 移除非必需权限,只保留 Put 文件上传功能,此处可根据需要自行修改
  21. 'policy' => '{
  22. "Statement": [
  23. {
  24. "Action": [
  25. "oss:PutObject"
  26. ],
  27. "Effect": "Allow",
  28. "Resource":[
  29. "acs:oss:*:*:'.env('ALIYUN_OSS_BUCKET').'/*"
  30. ]
  31. }
  32. ],
  33. "Version": "1"
  34. }'
  35. ]
  36. ];