Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
upload-apk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhoujun
upload-apk
Commits
73a60306
Commit
73a60306
authored
Mar 17, 2021
by
zhoujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改默认值
parent
5da179f9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
app/Services/Apk/ApkService.php
app/Services/Apk/ApkService.php
+1
-1
vendor/peinhu/aetherupload-laravel/src/Receiver.php
vendor/peinhu/aetherupload-laravel/src/Receiver.php
+4
-4
vendor3.zip
vendor3.zip
+0
-0
No files found.
app/Services/Apk/ApkService.php
View file @
73a60306
...
@@ -57,7 +57,7 @@ class ApkService implements IApkService
...
@@ -57,7 +57,7 @@ class ApkService implements IApkService
$row
->
md5
=
$md5
;
$row
->
md5
=
$md5
;
$row
->
size
=
$postData
[
'apk_size'
];
$row
->
size
=
$postData
[
'apk_size'
];
$row
->
origin_name
=
$postData
[
'apk_origin_name'
];
$row
->
origin_name
=
$postData
[
'apk_origin_name'
];
$row
->
remark
=
$postData
[
'remark'
];
$row
->
remark
=
$postData
[
'remark'
]
??
''
;
if
(
$row
->
save
()){
if
(
$row
->
save
()){
unset
(
$postData
[
'_token'
]);
unset
(
$postData
[
'_token'
]);
OptionLogModel
::
getAddLog
(
'apk'
,
'add'
,
$postData
,
Auth
::
id
(),
$row
->
id
,
'上传apk'
);
OptionLogModel
::
getAddLog
(
'apk'
,
'add'
,
$postData
,
Auth
::
id
(),
$row
->
id
,
'上传apk'
);
...
...
vendor/peinhu/aetherupload-laravel/src/Receiver.php
View file @
73a60306
...
@@ -47,13 +47,13 @@ class Receiver
...
@@ -47,13 +47,13 @@ class Receiver
public
function
renameTempFile
(
$fileName
)
public
function
renameTempFile
(
$fileName
)
{
{
//
$savedFileHash = $this->generateSavedFileHash($this->uploadPartialFile);
$savedFileHash
=
$this
->
generateSavedFileHash
(
$this
->
uploadPartialFile
);
$savedFileHash
=
$fileName
;
//
$savedFileHash = $fileName;
if
(
RedisHandler
::
hashExists
(
$savedFileHash
)
)
{
if
(
RedisHandler
::
hashExists
(
$savedFileHash
)
)
{
$this
->
savedPath
=
RedisHandler
::
getFilePathByHash
(
$savedFileHash
);
$this
->
savedPath
=
RedisHandler
::
getFilePathByHash
(
$savedFileHash
);
}
else
{
}
else
{
//
$this->savedPath = ConfigMapper::get('FILE_DIR') . DIRECTORY_SEPARATOR . ConfigMapper::get('FILE_SUB_DIR') . DIRECTORY_SEPARATOR . $savedFileHash . '.' . $this->uploadExt;
$this
->
savedPath
=
ConfigMapper
::
get
(
'FILE_DIR'
)
.
DIRECTORY_SEPARATOR
.
ConfigMapper
::
get
(
'FILE_SUB_DIR'
)
.
DIRECTORY_SEPARATOR
.
$savedFileHash
.
'.'
.
$this
->
uploadExt
;
$this
->
savedPath
=
ConfigMapper
::
get
(
'FILE_DIR'
)
.
DIRECTORY_SEPARATOR
.
ConfigMapper
::
get
(
'FILE_SUB_DIR'
)
.
DIRECTORY_SEPARATOR
.
$savedFileHash
;
//
$this->savedPath = ConfigMapper::get('FILE_DIR') . DIRECTORY_SEPARATOR . ConfigMapper::get('FILE_SUB_DIR') . DIRECTORY_SEPARATOR . $savedFileHash;
if
(
!
@
rename
(
$this
->
uploadPartialFile
,
ConfigMapper
::
get
(
'UPLOAD_PATH'
)
.
DIRECTORY_SEPARATOR
.
$this
->
savedPath
)
)
{
if
(
!
@
rename
(
$this
->
uploadPartialFile
,
ConfigMapper
::
get
(
'UPLOAD_PATH'
)
.
DIRECTORY_SEPARATOR
.
$this
->
savedPath
)
)
{
return
false
;
return
false
;
...
...
vendor3.zip
0 → 100644
View file @
73a60306
File added
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