1

T have Work on Dynamic Option that contain file-upload field and i want to save dynamic option with file in magento 2.

enter image description here

Here we can see Option with Dynamic Option that contain file field.

What the use of

$uploaderFactory->addValidateCallback('custom_image_upload',$imageAdapter,'validateUploadFile');
2
  • what issue exactly you are facing ? Need to implement Dynamic Option ?? Commented Mar 27, 2019 at 6:38
  • 'each option with image' i want to save image in option's array Commented Mar 27, 2019 at 7:56

1 Answer 1

1

are your images uploaded well ? If it's the case, this is how you can save images in your database : When you are saving you should call something like this : $data = $this->getRequest()->getPostValue(); Just debug $data. Normally you will see an array with all data you need from your form. Just get the field name of your upload file field, pass it to your model and save :)

Hope it helps

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.