1

I want to send an image file using REST API in Drupal 8 along with a registration form. I have built a custom API to save the registration form.

For the files i have created another API to save data using HEADERS Content-Type : multipart/form-data and update the registration form with fid after saving it.

When i send the file using POSTMAN Chrome extension to check API, i dont get the file data in $request->files->get('image_name') in my Controller. What may be the reason?

0

As I know, right now it's not possible. You can upload files as base_64. Discussion is here https://www.drupal.org/node/1927648

  • Hey Eugene, link-only answers are discouraged. What if the link becomes invalid? Please try to summarize the content the link provides to make this a long-lasting and comprehensive answer :) – leymannx Aug 28 '18 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.