Skip to content
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

media-files POST for creation is not working #510

Open
AkeneoUser opened this issue Aug 4, 2021 · 1 comment
Open

media-files POST for creation is not working #510

AkeneoUser opened this issue Aug 4, 2021 · 1 comment

Comments

@AkeneoUser
Copy link

The form data looks ok to me and seems to comply with the specs of the media-files api, but I'm getting an error response.

invokehttp.response.body
{"code":422,"message":"You should at least give one of the following properties: "product" or "product_model"."}

0x00000000 | 2D | 2D | 38 | 44 | 7A | 67 | 61 | 58 | 66 | 58 | 53 | 4C | 39 | 63 | 77 | 41 | --8DzgaXfXSL9cwA
0x00000010 | 41 | 41 | 65 | 4D | 74 | 66 | 69 | 43 | 59 | 45 | 66 | 43 | 35 | 4A | 59 | 56 | AAeMtfiCYEfC5JYV
0x00000020 | 68 | 64 | 6A | 6C | 57 | 66 | 4E | 76 | 64 | 67 | 0D | 0A | 43 | 6F | 6E | 74 | hdjlWfNvdg..Cont
0x00000030 | 65 | 6E | 74 | 2D | 44 | 69 | 73 | 70 | 6F | 73 | 69 | 74 | 69 | 6F | 6E | 3A | ent-Disposition:
0x00000040 | 20 | 66 | 6F | 72 | 6D | 2D | 64 | 61 | 74 | 61 | 3B | 20 | 6E | 61 | 6D | 65 | form-data; name
0x00000050 | 3D | 22 | 70 | 72 | 6F | 64 | 75 | 63 | 74 | 22 | 0D | 0A | 0D | 0A | 7B | 22 | ="product"....{"
0x00000060 | 69 | 64 | 65 | 6E | 74 | 69 | 66 | 69 | 65 | 72 | 22 | 3A | 22 | 53 | 47 | 36 | identifier":"SG6
0x00000070 | 39 | 30 | 32 | 32 | 53 | 50 | 22 | 2C | 20 | 22 | 61 | 74 | 74 | 72 | 69 | 62 | 9022SP", "attrib
0x00000080 | 75 | 74 | 65 | 22 | 3A | 22 | 69 | 6D | 61 | 67 | 65 | 5F | 61 | 22 | 2C | 20 | ute":"image_a",
0x00000090 | 22 | 73 | 63 | 6F | 70 | 65 | 22 | 3A | 6E | 75 | 6C | 6C | 2C | 22 | 6C | 6F | "scope":null,"lo
0x000000A0 | 63 | 61 | 6C | 65 | 22 | 3A | 6E | 75 | 6C | 6C | 7D | 0D | 0A | 2D | 2D | 38 | cale":null}..--8
0x000000B0 | 44 | 7A | 67 | 61 | 58 | 66 | 58 | 53 | 4C | 39 | 63 | 77 | 41 | 41 | 41 | 65 | DzgaXfXSL9cwAAAe
0x000000C0 | 4D | 74 | 66 | 69 | 43 | 59 | 45 | 66 | 43 | 35 | 4A | 59 | 56 | 68 | 64 | 6A | MtfiCYEfC5JYVhdj
0x000000D0 | 6C | 57 | 66 | 4E | 76 | 64 | 67 | 0D | 0A | 43 | 6F | 6E | 74 | 65 | 6E | 74 | lWfNvdg..Content
0x000000E0 | 2D | 44 | 69 | 73 | 70 | 6F | 73 | 69 | 74 | 69 | 6F | 6E | 3A | 20 | 66 | 6F | -Disposition: fo
0x000000F0 | 72 | 6D | 2D | 64 | 61 | 74 | 61 | 3B | 20 | 6E | 61 | 6D | 65 | 3D | 22 | 66 | rm-data; name="f
0x00000100 | 69 | 6C | 65 | 22 | 3B | 20 | 66 | 69 | 6C | 65 | 6E | 61 | 6D | 65 | 3D | 22 | ile"; filename="
0x00000110 | 73 | 67 | 70 | 2D | 67 | 66 | 2D | 76 | 2D | 6E | 70 | 2E | 6A | 70 | 67 | 22 | sgp-gf-v-np.jpg"
0x00000120 | 0D | 0A | 43 | 6F | 6E | 74 | 65 | 6E | 74 | 2D | 54 | 79 | 70 | 65 | 3A | 20 | ..Content-Type:
0x00000130 | 61 | 70 | 70 | 6C | 69 | 63 | 61 | 74 | 69 | 6F | 6E | 2F | 6F | 63 | 74 | 65 | application/octe
0x00000140 | 74 | 2D | 73 | 74 | 72 | 65 | 61 | 6D | 0D | 0A | 0D | 0A | EF | BF | BD | EF | t-stream........
0x00000150 | BF | BD | EF | BF | BD | EF | BF | BD | 00 | 18 | 45 | 78 | 69 | 66 | 00 | 00 | ..........Exif..
0x00000160 | 49 | 49 | 2A | 00 | 08 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | II*.............
0x00000170 | EF | BF | BD | EF | BF | BD | 00 | 11 | 44 | 75 | 63 | 6B | 79 | 00 | 01 | 00 | ........Ducky...
0x00000180 | 04 | 00 | 00 | 00 | 3C | 00 | 00 | EF | BF | BD | EF | BF | BD | 04 | 0C | 68 | ....<..........h
0x00000190 | 74 | 74 | 70 | 3A | 2F | 2F | 6E | 73 | 2E | 61 | 64 | 6F | 62 | 65 | 2E | 63 | ttp://ns.adobe.c
0x000001A0 | 6F | 6D | 2F | 78 | 61 | 70 | 2F | 31 | 2E | 30 | 2F | 00 | 3C | 3F | 78 | 70 | om/xap/1.0/. 0x00000250 | 3C | 72 | 64 | 66 | 3A | 52 | 44 | 46 | 20 | 78 | 6D | 6C | 6E | 73 | 3A | 72 | 0x00000510 | 3C | 72 | 64 | 66 | 3A | 41 | 6C | 74 | 3E | 20 | 3C | 72 | 64 | 66 | 3A | 6C | Web < 0x00000550 | 2F | 64 | 63 | 3A | 74 | 69 | 74 | 6C | 65 | 3E | 20 | 3C | 2F | 72 | 64 | 66 | /dc:title> .......
0x000005A0 | 48 | 50 | 68 | 6F | 74 | 6F | 73 | 68 | 6F | 70 | 20 | 33 | 2E | 30 | 00 | 38 | HPhotoshop 3.0.8
0x000005B0 | 42 | 49 | 4D | 04 | 04 | 00 | 00 | 00 | 00 | 00 | 0F | 1C | 01 | 5A | 00 | 03 | BIM..........Z..
0x000005C0 | 1B | 25 | 47 | 1C | 02 | 00 | 00 | 02 | 00 | 02 | 00 | 38 | 42 | 49 | 4D | 04 | .%G........8BIM.
0x000005D0 | 25 | 00 | 00 | 00 | 00 | 00 | 10 | EF | BF | BD | EF | BF | BD | 1F | EF | BF | %...............
0x000005E0 | BD | C8 | B7 | EF | BF | BD | 78 | 2F | 34 | 62 | 34 | 07 | 58 | 77 | EF | BF | ......x/4b4.Xw..
0x000005F0 | BD | EF | BF | BD | EF | BF | BD | 00 | 0E | 41 | 64 | 6F | 62 | 65 | 00 | 64 | .........Adobe.d

@AkeneoUser
Copy link
Author

--Ifb6p4_c_8njexJDDLKN7Waes5crz2-lNMB
Content-Disposition: form-data; name="product"

{"identifier":"MY12200", "attribute":"display_product_image", "scope":null,"locale":null}
--Ifb6p4_c_8njexJDDLKN7Waes5crz2-lNMB
Content-Disposition: form-data; name="file"; filename="4812126_MYS_800x800.jpg"
Content-Type: application/octet-stream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@AkeneoUser and others