当前位置:网站首页>Laravel8 framework seven cattle cloud upload
Laravel8 framework seven cattle cloud upload
2022-06-09 16:21:00 【Fox catsup】
utilize composer Download dependency package
composer require itbdw/laravel-storage-qiniuopen config Under folder app.php file , stay providers Add a code to
itbdw\QiniuStorage\QiniuFilesystemServiceProvider::class,open config Under folder filesystems.php file , stay disks Add a code to
'qiniu' => [
'driver' => 'qiniu',
'domain' => '', // Your seven cattle domain name
'access_key'=> '', //AccessKey
'secret_key'=> '', //SecretKey
'bucket' => '', //Bucket name , That is, the name of qiniu cloud storage space
],Write add method in controller
public function fileAdd(){
$disk = \Storage::disk('qiniu'); // Upload with 7niuyun
$time = date('Y-m-d');
$filename = $disk->put($time, request()->file('image'));// Upload
if(!$filename) {
echo " Upload failed ";
}
$img_url = $disk->getDriver()->downloadUrl($filename); // Get download link
echo $img_url;
}边栏推荐
- Middle office architecture learning
- 65 2D drawing (basic drawing and filling)
- Analysis of variable hiding security in contract security
- R语言plotly可视化:使用plotly可视化模型在整个数据空间的分类轮廓线(等高线)、使用meshgrid创建一个网格,其中每个点之间的距离由mesh_size变量表示
- Nth child selector
- Still building projects from scratch? This upgraded rapid development scaffold is worth a try~
- IdentityServer4 入门之一/之二
- R language plot visualization: plot to visualize the two-dimensional histogram contour map, and add two variable edge histograms (2D histogram contour subplot) on the top and right of the two-dimensio
- Is it safe to open a new bond? How to open an account
- [ctfshow 单身杯]web writeup&&学习一下sed awk基本用法
猜你喜欢

应用软件效率测试的执行策略

10个必备的AutoCAD插件

LeetCode 1420. Generate array

618's money saving technology strategy is coming - experience the scene and get a 10 yuan cat super card!

Dapr 源码解析 | 基本介绍

Data security is urgent. What is the significance of the first SOC 2 authentication report for domestic intelligent manufacturers?

今日睡眠质量记录82分

Analysis of variable hiding security in contract security

What if win10 cannot find the flight mode switch?

Kubernetes core concepts
随机推荐
如何高效学习 思维导图
The end of an era! Wu Enda's classic machine learning course was closed this month however
C#/VB.NET 在Word转PDF时生成目录书签
R语言广义线性模型函数GLM、glm函数构建逻辑回归模型(Logistic regression)、分析模型是否过离散(Overdispersion)、使用假设检验的方法来分析模型是否过度分散
枚举的替代方案 —— 枚举类
Reconstruction essentials learning
10个必备的AutoCAD插件
R language plot visualization: plot to visualize the two-dimensional histogram contour map, and add two variable edge histograms (2D histogram contour subplot) on the top and right of the two-dimensio
My Lord, times have changed...
cesium 绘制栅栏
May training (the 26th day) - collective search
[ctfshow singles cup]web writeup & learn the basic usage of SED awk
June training (day 01) - array
618's money saving technology strategy is coming - experience the scene and get a 10 yuan cat super card!
WordPress网站底部的自定页面(如:网站地图等)按钮美化教程
站长工具浏览器SEO插件-站长必备工具 SEO网站排名 快速查看网站数据
Rapid development template based on ABP vNext
LeetCode 6076. Represents the minimum number of line segments of a line graph
June training (day 08) - prefix and
R语言使用aov函数进行双因素方差分析(Two-way factorial ANOVA)、gplots包的plotmeans函数在双因素方差分析中显示交互作用、包括均值,误差条、95%置信区间、样本量