Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webcul-dam
Overview
Overview
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
Akeneo bundles
webcul-dam
Commits
c550d0ff
Commit
c550d0ff
authored
Oct 21, 2020
by
Krzysztof Kuźniar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update module - fix media dir
parent
40969271
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
10 deletions
+17
-10
AssetsController.php
Controller/Akeneo3/AssetsController.php
+3
-2
AssetsController.php
Controller/Akeneo4/AssetsController.php
+3
-2
AssetsController.php
Controller/AssetsController.php
+3
-2
AssetsController_old.php
Controller/AssetsController_old.php
+4
-2
PostMediaController.php
Controller/PostMediaController.php
+2
-1
AssetUpdater.php
Updater/AssetUpdater.php
+2
-1
No files found.
Controller/Akeneo3/AssetsController.php
View file @
c550d0ff
...
...
@@ -17,6 +17,7 @@ use Doctrine\ORM\Tools\Pagination\Paginator;
use
Symfony\Component\HttpFoundation\File\UploadedFile
;
use
Webkul\DamBundle\Services\DamServices
;
use
Webkul\DamBundle\Context\Akeneo3\UserContext
;
use
Akeneo\Pim\Enrichment\Component\FileStorage
;
/**
* Assets Controller
...
...
@@ -426,7 +427,7 @@ class AssetsController extends Controller
// } else {
// $fst = $this->filesystemprovider->sys_get_temp_dir();
// }
$fsc
=
$this
->
filesystemprovider
->
getFilesystem
(
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
$fsc
=
$this
->
filesystemprovider
->
getFilesystem
(
FileStorage
::
CATALOG_STORAGE_ALIAS
);
$checkMedia
=
$this
->
damservices
->
getMediaByFilepath
(
$params
[
'filePath'
]);
$em
=
$this
->
getDoctrine
()
->
getManager
();
...
...
@@ -476,7 +477,7 @@ class AssetsController extends Controller
*/
protected
function
storeFile
(
UploadedFile
$uploadedFile
)
{
return
$this
->
filestorer
->
store
(
$uploadedFile
,
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
return
$this
->
filestorer
->
store
(
$uploadedFile
,
FileStorage
::
CATALOG_STORAGE_ALIAS
);
}
public
function
checkCredentialAction
(
Request
$request
)
...
...
Controller/Akeneo4/AssetsController.php
View file @
c550d0ff
...
...
@@ -17,6 +17,7 @@ use Doctrine\ORM\Tools\Pagination\Paginator;
use
Symfony\Component\HttpFoundation\File\UploadedFile
;
use
Webkul\DamBundle\Services\DamServices
;
use
Webkul\DamBundle\Context\UserContext
;
use
Akeneo\Pim\Enrichment\Component\FileStorage
;
/**
* Assets Controller
...
...
@@ -423,7 +424,7 @@ class AssetsController extends Controller
$checkMedia
=
$this
->
damservices
->
getMediaByFilepath
(
$params
[
'filePath'
]);
$fsc
=
$this
->
filesystemprovider
->
getFilesystem
(
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
$fsc
=
$this
->
filesystemprovider
->
getFilesystem
(
FileStorage
::
CATALOG_STORAGE_ALIAS
);
$em
=
$this
->
getDoctrine
()
->
getManager
();
if
(
$checkMedia
)
{
$originalName
=
$checkMedia
->
getOriginalFilename
();
...
...
@@ -469,7 +470,7 @@ class AssetsController extends Controller
*/
protected
function
storeFile
(
UploadedFile
$uploadedFile
)
{
return
$this
->
filestorer
->
store
(
$uploadedFile
,
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
return
$this
->
filestorer
->
store
(
$uploadedFile
,
FileStorage
::
CATALOG_STORAGE_ALIAS
);
}
public
function
checkCredentialAction
(
Request
$request
)
...
...
Controller/AssetsController.php
View file @
c550d0ff
...
...
@@ -18,6 +18,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use
Webkul\DamBundle\Services\DamServices
;
use
Webkul\DamBundle\Context\UserContext
;
use
Webkul\DamBundle\Listener\ClassDefinationForCompatibility
;
use
Akeneo\Pim\Enrichment\Component\FileStorage
;
$versionCompatiblility
=
new
ClassDefinationForCompatibility
();
$versionCompatiblility
->
createClassAliases
();
...
...
@@ -438,7 +439,7 @@ class AssetsController extends Controller
$checkMedia
=
$this
->
damservices
->
getMediaByFilepath
(
$params
[
'filePath'
]);
$fsc
=
$this
->
filesystemprovider
->
getFilesystem
(
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
$fsc
=
$this
->
filesystemprovider
->
getFilesystem
(
FileStorage
::
CATALOG_STORAGE_ALIAS
);
$em
=
$this
->
getDoctrine
()
->
getManager
();
if
(
$checkMedia
)
{
$originalName
=
$checkMedia
->
getOriginalFilename
();
...
...
@@ -484,7 +485,7 @@ class AssetsController extends Controller
*/
protected
function
storeFile
(
UploadedFile
$uploadedFile
)
{
return
$this
->
filestorer
->
store
(
$uploadedFile
,
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
return
$this
->
filestorer
->
store
(
$uploadedFile
,
FileStorage
::
CATALOG_STORAGE_ALIAS
);
}
public
function
checkCredentialAction
(
Request
$request
)
...
...
Controller/AssetsController_old.php
View file @
c550d0ff
...
...
@@ -17,6 +17,8 @@ use Doctrine\ORM\Tools\Pagination\Paginator;
use
Symfony\Component\HttpFoundation\File\UploadedFile
;
use
Webkul\DamBundle\Services\DamServices
;
use
Webkul\DamBundle\Context\UserContext
;
use
Akeneo\Pim\Enrichment\Component\FileStorage
;
/**
* Assets Controller
*
...
...
@@ -414,7 +416,7 @@ class AssetsController extends Controller
}
else
{
$fst
=
$this
->
filesystemprovider
->
sys_get_temp_dir
();
}
$fsc
=
$this
->
filesystemprovider
->
getFilesystem
(
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
$fsc
=
$this
->
filesystemprovider
->
getFilesystem
(
FileStorage
::
CATALOG_STORAGE_ALIAS
);
$checkMedia
=
$this
->
damservices
->
getMediaByFilepath
(
$params
[
'filePath'
]);
$em
=
$this
->
getDoctrine
()
->
getManager
();
...
...
@@ -464,7 +466,7 @@ class AssetsController extends Controller
*/
protected
function
storeFile
(
UploadedFile
$uploadedFile
)
{
return
$this
->
filestorer
->
store
(
$uploadedFile
,
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
return
$this
->
filestorer
->
store
(
$uploadedFile
,
FileStorage
::
CATALOG_STORAGE_ALIAS
);
}
public
function
checkCredentialAction
(
Request
$request
)
...
...
Controller/PostMediaController.php
View file @
c550d0ff
...
...
@@ -9,6 +9,7 @@ use Symfony\Component\HttpFoundation\Request;
use
Symfony\Component\HttpFoundation\Response
;
use
Symfony\Component\Validator\Validator\ValidatorInterface
;
use
Webkul\DamBundle\Listener\ClassDefinationForCompatibility
;
use
Akeneo\Pim\Enrichment\Component\FileStorage
;
$versionCompatiblility
=
new
ClassDefinationForCompatibility
();
$versionCompatiblility
->
createClassAliases
();
...
...
@@ -91,6 +92,6 @@ class PostMediaController
*/
protected
function
storeFile
(
UploadedFile
$uploadedFile
)
{
return
$this
->
fileStorer
->
store
(
$uploadedFile
,
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
return
$this
->
fileStorer
->
store
(
$uploadedFile
,
FileStorage
::
CATALOG_STORAGE_ALIAS
);
}
}
Updater/AssetUpdater.php
View file @
c550d0ff
...
...
@@ -14,6 +14,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use
Symfony\Component\Validator\Validator\ValidatorInterface
;
use
Symfony\Component\Filesystem\Filesystem
;
use
Webkul\DamBundle\Listener\ClassDefinationForCompatibility
;
use
Akeneo\Pim\Enrichment\Component\FileStorage
;
$versionCompatiblility
=
new
ClassDefinationForCompatibility
();
$versionCompatiblility
->
createClassAliases
();
...
...
@@ -331,6 +332,6 @@ class AssetUpdater implements \ObjectUpdaterInterface
*/
protected
function
storeFile
(
UploadedFile
$uploadedFile
)
{
return
$this
->
fileStorer
->
store
(
$uploadedFile
,
\
FileStorage
::
CATALOG_STORAGE_ALIAS
);
return
$this
->
fileStorer
->
store
(
$uploadedFile
,
FileStorage
::
CATALOG_STORAGE_ALIAS
);
}
}
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