From 8befaf6d2551c649a2f9fcffe685392d07c355be Mon Sep 17 00:00:00 2001 From: zulfikarrosadi Date: Sun, 15 Sep 2024 15:05:30 +0700 Subject: [PATCH] feat(upload image): change postman create product to send application/multipart-form-data --- Juadah.postman_collection.json | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/Juadah.postman_collection.json b/Juadah.postman_collection.json index 200875d..fcc2707 100644 --- a/Juadah.postman_collection.json +++ b/Juadah.postman_collection.json @@ -120,13 +120,32 @@ "method": "POST", "header": [], "body": { - "mode": "raw", - "raw": "{\n \"name\": \"{{$randomProductName}}\",\n \"description\": \"{{$randomLoremParagraph}}\",\n \"price\": 10000\n}", - "options": { - "raw": { - "language": "json" + "mode": "formdata", + "formdata": [ + { + "key": "name", + "value": "{{$randomProductName}}", + "type": "text" + }, + { + "key": "description", + "value": "{{$randomLoremLines}}", + "type": "text" + }, + { + "key": "price", + "value": "10000", + "type": "text" + }, + { + "key": "images", + "type": "file", + "src": [ + "postman-cloud:///1ef7334f-dd93-4960-a155-8de29fcef4ee", + "postman-cloud:///1ef7334f-d60f-4c20-b99b-52e926854037" + ] } - } + ] }, "url": { "raw": "{{base_url}}/products",