shopware6 api - shopware API upload image from URL within sync endpoint - Stack Overflow

I am using the sw-api (version": "6.6.9.0) and I am looking for a way to upload media with a

I am using the sw-api (version": "6.6.9.0) and I am looking for a way to upload media with a bulk operation (in order to transmit several URLs in only one POST)

instead of using

/api/_action/media/d1735379b7a980b88d96727913c090dc/upload?extension=png&fileName=myImage

with body

{
  "url": "https://myUrl/myImage.png"
}

which means only 1 URL per POST,

I would like to do this in a bulk

/api/_action/sync

[
    {
        "entity": "media",
        "action": "upsert",
        "payload": [
            {
                "id": "d1735379b7a980b88d96727913c090dc",
                "url": "https://myURL/myImage.png",
                "fileName": "myImage",
                "extension": "png"
            }
        ]
    }
]

unfortunately, my approach does not work (Bad request).

Any hint is appreciated.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745287181a4620633.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信