Html elements being rendered twice with canvas.append?

Hi Guys, so I’m currently trying to create an uploader, but I have an issue where the uploader is being rendered twice on the page.

For the element I’ve pretty much just used instance.canvas.append(Here's the html)

Any ide what could be the issue? Thank you for the help!

Did you put the canvas append in initialize or in update function?
Is this Inno file uploader? If yes… I’ve already created the plugin and looking for testers if interested :stuck_out_tongue:

In the Update function, but I’ve realized in the meantime that it has something to do with version 3 actually so the issue was there, I’ll try to figure the details.

No, it’s not but I’m always up for testing, so I’d be interested for sure :smiley:

1 Like

Don’t forget that update function will run each time a field value have been updated for the element. Normally, append canvas should be in initialize. But there’s some case you will need to do it in update, just make sure it doens’t run more time than you need :wink:

Send me aPM with the app id you want to test it. I just need to upgrade it to the new responsive engine but the rest is ready for testing.

1 Like

May I also suggest that you take a look at this plugin: Better Uploader ☁️ [Free Plugin] built by @jonah.deleseleuc. I think it could help you greatly in building your plugin. As the plugin is free you can view the source code and fork/modify it to your needs.

If you are not in need of something custom, you might find the plugin already has everything you need.

2 Likes

Thanks for mentioning me. You could also request a feature :slight_smile:

1 Like

Thank you guys, yes this plugin actually started as a forked version of Better Uploader :smiley: I just needed some custom functions and third party connections, but been using Better Uploader it’s super cool, highly recommend it!

3 Likes