ฉันสามารถสร้างบทความผ่านได้REST
โดยไม่มีปัญหา แต่ฉันไม่สามารถหาวิธีส่งไฟล์ได้
ฉันจะส่งไฟล์ (ภาพ) ไปยัง Drupal 8 ผ่านได้REST
อย่างไร
ปรับปรุง:
REST UI - File: /file/{id}
Example image added in article:
/admin/content/files -> /admin/content/files/usage/1
file {id} = 1?
Get file id 1:
curl --request GET --user admin:admin --header 'Accept: application/hal+json' http://d8.local/file/1
A fatal error occurred: No route found for "GET /file/1"
โพสต์ภาพ (ไม่มีเนื้อหาเอนทิตี):
curl --request POST --user admin:admin --header 'Content-type: application/hal+json' http://d8.local/entity/file
{"error":"No entity content received."}
ฉันหาวิธีสร้างentity content
ไม่ได้