当前位置:网站首页>Wechat applet uploading seven cattle cloud laravel
Wechat applet uploading seven cattle cloud laravel
2022-06-22 03:55:00 【. Sea moon】
Use Lin_ui Add the style
<l-image-picker name="image"/>.js Get photo Pictures are transferred to the background as an array , Convert to character format first
var image=e.detail.value.image.join(',');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;
}
边栏推荐
- Laravel realizes file (picture) uploading
- Fluent syntax configuration
- Join waits for synchronization results from multiple threads
- How to realize SVN efficient management
- MySQL 45 lecture learning notes (II) execution of SQL update statements
- Intranet penetration
- H index problem
- Mysql 45讲学习笔记(三)SQL更新语句的执行
- 积加ERP全局参数灵活配置成本取值规则,核算全面到位
- PHP connection to mysql8.0 reports an error: illuminate\database\queryexception
猜你喜欢

Interviewer: do you know the life cycle of flutter?

How to install laravel

倍福TwinCAT3第三方伺服电机——以汇川IS620N伺服为例子

【写文章神器】标记语言Markdown的使用

我在华为度过的 “两辈子”(学习那些在大厂表现优秀的人)

Implementation of common function blocks for Beifu twincat3 servo control

MySQL 45 lecture learning notes (II) execution of SQL update statements

128陷阱——源码分析

How to implement dart asynchrony

The future has come: cloud primary Era
随机推荐
Fatal NI connect error 12170. Error reporting processing
Flutter 颜色渐变及模仿淘宝渐变关注按钮
Irregular naming
Application method and operation of Beifu cx9020 (wince 7) controller
Research on std:: move and std:: forward right value reference
Introduction to various models of Beifu embedded controller PLC
倍福 PLC 字符串类型string操作
Experience and summary of embedded software testing
3DE position of moving object
Code of ultrasonic rangefinder based on 51 (screenshot version)
How far is the memory computing integrated chip from popularization? Listen to what practitioners say | collision school x post friction intelligence
Replacement has 2 rows, data has 0, to solve how R language dynamically generates dataframes
About calling EditText in dialog
SSM based blog system [with background management]
Dart异步是怎么实现
What are the useful work reporting tools
Mqtt of NLog custom target
Wechat applet ChAT expression
Mysql 45讲学习笔记(三)SQL更新语句的执行
be based on. NETCORE development blog project starblog - (12) razor page dynamic compilation