2

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 file ID after saving it.

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

1
  • 2
    As I know, right now it's not possible. You can upload files as base_64. Discussion is here drupal.org/node/1927648
    – Eugene
    Commented Aug 18, 2016 at 5:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.