-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API]Product image handling #12847
[API]Product image handling #12847
Conversation
arti0090
commented
Jul 28, 2021
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
License | MIT |
c9c424b
to
0c39a7b
Compare
975c850
to
ba52863
Compare
ba52863
to
be44dda
Compare
eac1b75
to
c141d1c
Compare
822230c
to
bcf281c
Compare
bcf281c
to
17afb9f
Compare
@@ -33,6 +33,11 @@ public function getConfigTreeBuilder(): TreeBuilder | |||
->defaultFalse() | |||
->end() | |||
->end() | |||
->children() | |||
->variableNode('product_image_prefix') | |||
->defaultValue('media/image') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with defining this value as a parameter, however we should at least use another parameter, that will be used here as well:
data_root: "%sylius_core.public_dir%/media/image" |
But once we will introduce the parameter there, I'm not sure we need it. Up to you.
src/Sylius/Bundle/ApiBundle/Serializer/ProductImageNormalizer.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Serializer/ProductImageNormalizer.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/spec/Serializer/ProductImageNormalizerSpec.php
Outdated
Show resolved
Hide resolved
c5a9a77
to
db98dd4
Compare
UPGRADE-API-1.11.md
Outdated
"id": "123", | ||
"type": "thumbnail", | ||
"path": "uo/product.jpg", | ||
+ "media_path": "/media/image/uo/product.jpg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I see correctly, there is no more media_path
, you are updating path
field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed it a little now :)
src/Sylius/Bundle/ApiBundle/Serializer/ProductImageNormalizer.php
Outdated
Show resolved
Hide resolved
db98dd4
to
b464218
Compare
b464218
to
201e900
Compare
Thank you, @arti0090! 🎉 |