Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
hujun
tl_estate
Commits
8536b8fc
Commit
8536b8fc
authored
Jul 02, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
key修改
(cherry picked from commit
18471836
)
parent
8d8a30c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
UploadFileService.php
application/api_broker/service/UploadFileService.php
+20
-0
No files found.
application/api_broker/service/UploadFileService.php
View file @
8536b8fc
...
@@ -24,6 +24,25 @@ class UploadFileService
...
@@ -24,6 +24,25 @@ class UploadFileService
*/
*/
public
function
upload
(
$_upload_file
,
$type
,
$size
=
1000000
,
$ext
=
[
'jpg'
])
public
function
upload
(
$_upload_file
,
$type
,
$size
=
1000000
,
$ext
=
[
'jpg'
])
{
{
/**
*
upload($_FILE['file'])
array(2) {
[0] => array(3) {
["code"] => int(200)
["img_path"] => string(19) "201807021804140.jpg"
["img_ext"] => string(3) "jpg"
}
[1] => array(3) {
["code"] => int(200)
["img_path"] => string(20) "2018070218041401.jpg"
["img_ext"] => string(3) "jpg"
}
}
*/
$check
=
$this
->
checkUploadFile
(
$_upload_file
,
$size
,
$ext
);
$check
=
$this
->
checkUploadFile
(
$_upload_file
,
$size
,
$ext
);
if
(
$check
[
'code'
]
==
101
)
{
if
(
$check
[
'code'
]
==
101
)
{
...
@@ -45,6 +64,7 @@ class UploadFileService
...
@@ -45,6 +64,7 @@ class UploadFileService
break
;
break
;
case
'house_img'
:
case
'house_img'
:
$path
.=
'resource/lib/Attachments/images/'
;
$path
.=
'resource/lib/Attachments/images/'
;
break
;
default
:
default
:
$path
.=
'static/'
;
$path
.=
'static/'
;
}
}
...
...
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