Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
f9dc4f4c
Commit
f9dc4f4c
authored
Mar 18, 2022
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/optimize' into 'master'
fix See merge request
!504
parents
88b2fe45
cdcdc312
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
OssController.php
api/controllers/OssController.php
+1
-1
OssController.php
backend/controllers/OssController.php
+1
-1
OssController.php
wallet/controllers/OssController.php
+1
-1
No files found.
api/controllers/OssController.php
View file @
f9dc4f4c
...
@@ -22,7 +22,7 @@ class OssController extends BaseController
...
@@ -22,7 +22,7 @@ class OssController extends BaseController
$object
=
md5
(
date
(
'Y-m-d H:i:s'
)
.
$uploaded_file
->
tempName
)
.
'.'
.
$uploaded_file
->
extension
;
$object
=
md5
(
date
(
'Y-m-d H:i:s'
)
.
$uploaded_file
->
tempName
)
.
'.'
.
$uploaded_file
->
extension
;
$filePath
=
$uploaded_file
->
tempName
;
$filePath
=
$uploaded_file
->
tempName
;
$ossClient
=
new
OssClient
(
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeyId'
],
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeySecret'
],
Yii
::
$app
->
params
[
'Oss'
][
'Endpoint'
]);
$ossClient
=
new
OssClient
(
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeyId'
],
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeySecret'
],
Yii
::
$app
->
params
[
'Oss'
][
'Endpoint'
]);
$result
=
$ossClient
->
uploadFile
(
Yii
::
$app
->
params
[
'Bucket'
],
'upload/'
.
(
empty
(
$type
)
?
''
:
$type
.
'/'
)
.
$object
,
$filePath
);
$result
=
$ossClient
->
uploadFile
(
Yii
::
$app
->
params
[
'
Oss'
][
'
Bucket'
],
'upload/'
.
(
empty
(
$type
)
?
''
:
$type
.
'/'
)
.
$object
,
$filePath
);
if
(
!
isset
(
$result
[
"info"
][
'url'
]))
{
if
(
!
isset
(
$result
[
"info"
][
'url'
]))
{
$this
->
msg
=
'上传失败'
;
$this
->
msg
=
'上传失败'
;
$this
->
code
=
-
1
;
$this
->
code
=
-
1
;
...
...
backend/controllers/OssController.php
View file @
f9dc4f4c
...
@@ -19,7 +19,7 @@ class OssController extends BaseController
...
@@ -19,7 +19,7 @@ class OssController extends BaseController
$object
=
md5
(
date
(
'Y-m-d H:i:s'
)
.
$uploaded_file
->
tempName
)
.
'.'
.
$uploaded_file
->
extension
;
$object
=
md5
(
date
(
'Y-m-d H:i:s'
)
.
$uploaded_file
->
tempName
)
.
'.'
.
$uploaded_file
->
extension
;
$filePath
=
$uploaded_file
->
tempName
;
$filePath
=
$uploaded_file
->
tempName
;
$ossClient
=
new
OssClient
(
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeyId'
],
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeySecret'
],
Yii
::
$app
->
params
[
'Oss'
][
'Endpoint'
]);
$ossClient
=
new
OssClient
(
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeyId'
],
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeySecret'
],
Yii
::
$app
->
params
[
'Oss'
][
'Endpoint'
]);
$result
=
$ossClient
->
uploadFile
(
Yii
::
$app
->
params
[
'Bucket'
],
'upload/'
.
(
empty
(
$type
)
?
''
:
$type
.
'/'
)
.
$object
,
$filePath
);
$result
=
$ossClient
->
uploadFile
(
Yii
::
$app
->
params
[
'
Oss'
][
'
Bucket'
],
'upload/'
.
(
empty
(
$type
)
?
''
:
$type
.
'/'
)
.
$object
,
$filePath
);
if
(
!
isset
(
$result
[
"info"
][
'url'
]))
{
if
(
!
isset
(
$result
[
"info"
][
'url'
]))
{
return
[
'code'
=>
1
,
'msg'
=>
'上传失败'
];
return
[
'code'
=>
1
,
'msg'
=>
'上传失败'
];
}
}
...
...
wallet/controllers/OssController.php
View file @
f9dc4f4c
...
@@ -23,7 +23,7 @@ class OssController extends BaseController
...
@@ -23,7 +23,7 @@ class OssController extends BaseController
$object
=
md5
(
date
(
'Y-m-d H:i:s'
)
.
$uploaded_file
->
tempName
)
.
'.'
.
$uploaded_file
->
extension
;
$object
=
md5
(
date
(
'Y-m-d H:i:s'
)
.
$uploaded_file
->
tempName
)
.
'.'
.
$uploaded_file
->
extension
;
$filePath
=
$uploaded_file
->
tempName
;
$filePath
=
$uploaded_file
->
tempName
;
$ossClient
=
new
OssClient
(
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeyId'
],
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeySecret'
],
Yii
::
$app
->
params
[
'Oss'
][
'Endpoint'
]);
$ossClient
=
new
OssClient
(
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeyId'
],
Yii
::
$app
->
params
[
'Oss'
][
'AccessKeySecret'
],
Yii
::
$app
->
params
[
'Oss'
][
'Endpoint'
]);
$result
=
$ossClient
->
uploadFile
(
Yii
::
$app
->
params
[
'Bucket'
],
'upload/'
.
(
empty
(
$type
)
?
''
:
$type
.
'/'
)
.
$object
,
$filePath
);
$result
=
$ossClient
->
uploadFile
(
Yii
::
$app
->
params
[
'
Oss'
][
'
Bucket'
],
'upload/'
.
(
empty
(
$type
)
?
''
:
$type
.
'/'
)
.
$object
,
$filePath
);
if
(
!
isset
(
$result
[
"info"
][
'url'
]))
{
if
(
!
isset
(
$result
[
"info"
][
'url'
]))
{
$msg
=
'上传失败'
;
$msg
=
'上传失败'
;
$code
=
-
1
;
$code
=
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment