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
fa14ac42
Commit
fa14ac42
authored
Oct 23, 2020
by
Krzysztof Kuźniar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update module - fix media dir #2
parent
c550d0ff
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
18 deletions
+12
-18
AssetsController.php
Controller/Akeneo3/AssetsController.php
+2
-3
AssetsController.php
Controller/Akeneo4/AssetsController.php
+2
-3
AssetsController.php
Controller/AssetsController.php
+2
-3
AssetsController_old.php
Controller/AssetsController_old.php
+2
-4
PostMediaController.php
Controller/PostMediaController.php
+1
-2
media-field.js
Resources/public/js/form/media-field.js
+1
-1
DamServices.php
Services/DamServices.php
+1
-0
AssetUpdater.php
Updater/AssetUpdater.php
+1
-2
No files found.
Controller/Akeneo3/AssetsController.php
View file @
fa14ac42
...
...
@@ -17,7 +17,6 @@ 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
...
...
@@ -427,7 +426,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
();
...
...
@@ -477,7 +476,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 @
fa14ac42
...
...
@@ -17,7 +17,6 @@ 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
...
...
@@ -424,7 +423,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
();
...
...
@@ -470,7 +469,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 @
fa14ac42
...
...
@@ -18,7 +18,6 @@ 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
();
...
...
@@ -439,7 +438,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
();
...
...
@@ -485,7 +484,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 @
fa14ac42
...
...
@@ -17,8 +17,6 @@ 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
*
...
...
@@ -416,7 +414,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
();
...
...
@@ -466,7 +464,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 @
fa14ac42
...
...
@@ -9,7 +9,6 @@ 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
();
...
...
@@ -92,6 +91,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
);
}
}
Resources/public/js/form/media-field.js
View file @
fa14ac42
...
...
@@ -518,7 +518,7 @@ define([
this
.
setCurrentValue
(
value
);
}.
bind
(
this
));
}
else
{
this
.
setCurrentValue
(
value
);
this
.
setCurrentValue
(
value
s
);
}
},
...
...
Services/DamServices.php
View file @
fa14ac42
...
...
@@ -620,4 +620,5 @@ class DamServices
return
$code
;
}
}
Updater/AssetUpdater.php
View file @
fa14ac42
...
...
@@ -14,7 +14,6 @@ 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
();
...
...
@@ -332,6 +331,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