0

I've created customer attribute with type 'file'. Below is my code.

$attributesInfo = [
        'upload_documents' => [
            'label' => 'Upload Document',
            'type' => 'varchar',
            'input' => 'file',
            'position' => 1000,
            'visible' => true,
            'required' => false,
            'system' => 0,
            'user_defined' => true,
            'position' => 1000,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => true,
            'is_html_allowed_on_front' => true,
            'visible_on_front' => true
        ]
    ];

Attribute created and it works but can't allow me to upload PDF file. When I upload it it uploaded with out any error.

Like ,

enter image description here

After save it returns error like, enter image description here

In error log returns nothing.

Is there anything missing ?? Please help.

  • Did you try using backend_model? – Sohel Rana Feb 1 at 12:41
  • @vivek Did you able to create customer file type attribute ? – sumeet bajaj May 22 at 7:32
  • Yes I did that. But it will only work with Magento 2.3.1 – Vivek May 22 at 8:29
  • @Vivek ok but can we try to without upgrade – sumeet bajaj May 22 at 11:15
  • Yes we can do it. I'll post answer with in few hours. – Vivek May 22 at 16:52

Your Answer

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

Browse other questions tagged or ask your own question.