Integrate file upload in properties panel

Hey guys,

I am currently working at the properties panel and I added the following snipplet:

{
                  html: '<input type="file" id="fileUploaded" name="fileUploaded"><br><br>',
                  id: 'fileUploader',
                  description: 'File Upload',
                  label: 'File Upload',
                  modelProperty: 'fileUploader,
                  set: function(element, values){
                    return ;
                  }
                }

Now I get the following error message:
Failed to set the ‘selectionStart’ property on ‘HTMLInputElement’: The input element’s type (‘file’) does not support selection.

How can I solve this? What I forgot or what do I have to add?

Thanks

Can you maybe give some more details about your custom properties panel entry? Sharing your setup inside a CodeSandbox would really help us.

If I would guess I would say that the PropertiesPanel is currently not prepared for this input type. But I think we can tell more if we have more insights on your use case.

I simply added the above code in the properties-panel-extension. After removing the name attribute in the html tag I dont get the fault anymore but no function is called how I achieve that the set function is called?

This is hard to tell you without knowing your code …

I created a pull request :slight_smile: The only addition is in Spell Props. My intuition is to select a file (for example zip and then trigger in a function that this zip is uploaded to a given url)

I believe you refer to this PR?

Exactly and if you delete the name Attribute in the html tag then I dont get the fault anymore but how I achieve that for example the Set method is called?

Why did you open that PR?

That you can see what I did and maybe help me:)

A PR is usually better suited when someone really wants to contribute something to the codebase that stays.

If you want to share your example and ask for help, I think it’s better to do it via CodeSandbox.

Imagine every user who has a question opens a PR. I don’t want to imagine that. I closed the PR. Questions belong in the forum. :+1: