Add media field to custom entity#172
Add media field to custom entity#172simoncarre wants to merge 2 commits intoFriendsOfAkeneo:masterfrom
Conversation
Resources/config/routing.yml
Outdated
|
|
||
| pim_customentity_media_rest_post: | ||
| path: '/rest/customentity_media' | ||
| defaults: { _controller: pim_custom_entity.media_rest_controller.class:postAction } |
There was a problem hiding this comment.
@simoncarre here should be the name of the service pim_custom_entity.media_rest_controller , not the class. I got issue here
|
Tested on my side and works well, except the comment regarding service name. Thanks a lot @simoncarre for sharing |
|
Thank you @diglin for your test. |
|
Hello @simoncarre , Could you please also check what is failing on Travis? |
| { | ||
| /** @var \Symfony\Component\HttpFoundation\File\UploadedFile $file */ | ||
| $file = $request->files->get('file'); | ||
| $violations = $this->validator->validate($file); |
There was a problem hiding this comment.
Could you add an example of file validation in the AcmeCustomBundle ?
|
Hi @simoncarre, thank you so much for your contribution, this PR seems really promising ! |
| class MediaRestController | ||
| { | ||
| /** | ||
| * Validator interface |
| protected $validator; | ||
|
|
||
| /** | ||
| * Path generator |
|
@simoncarre: Hey Simon, any updates here? Would be very nice and extremely helpful to have this feature included in this bundle. |
Add JS files to manage media fields on custom entity