Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
Platform
Commits
a9e5a7ea
Unverified
Commit
a9e5a7ea
authored
Oct 09, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementing moving folders
parent
76287b36
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
MoveMediaController.php
Modules/Media/Http/Controllers/Api/MoveMediaController.php
+4
-0
No files found.
Modules/Media/Http/Controllers/Api/MoveMediaController.php
View file @
a9e5a7ea
...
@@ -38,6 +38,9 @@ class MoveMediaController extends Controller
...
@@ -38,6 +38,9 @@ class MoveMediaController extends Controller
if
(
$file
->
is_folder
===
false
)
{
if
(
$file
->
is_folder
===
false
)
{
$this
->
file
->
move
(
$file
,
$destination
);
$this
->
file
->
move
(
$file
,
$destination
);
}
}
if
(
$file
->
is_folder
===
true
)
{
$this
->
folder
->
move
(
$file
,
$destination
);
}
}
}
return
response
()
->
json
([
return
response
()
->
json
([
...
@@ -52,6 +55,7 @@ class MoveMediaController extends Controller
...
@@ -52,6 +55,7 @@ class MoveMediaController extends Controller
return
new
File
([
return
new
File
([
'id'
=>
0
,
'id'
=>
0
,
'folder_id'
=>
0
,
'folder_id'
=>
0
,
'path'
=>
config
(
'asgard.media.config.files-path'
),
]);
]);
}
}
}
}
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