File Control - File Type

I don’t see a way to limit the file type to be uploaded? Is there an attribute to limit file type on this control?

Hey @zack, I got an answer from a dev on this. It sounds like while these controls are functional for the most part in the current beta release, there are still plenty of features missing from them to make them truly useful and these features are being developed in tandem with other features that are key to the release of the full Tangible Blocks plugin. A lot of the attributes that worked on legacy controls haven’t been added to the new controls yet, but I got confirmation that this is a priority that will be addressed in a future update.

1 Like

I don’t know if it would be doable, but as long as every legacy feature is recreated, it would be cool to have a migration button to auto-convert legacy markup to new markup on each block once the new controls are complete.

I’m not sure that would be possible, unfortunately, despite the fact that in a lot of cases the syntax between the old controls and the new controls is the same. In theory, if the block isn’t actually used on any pages, I’m pretty sure you could just flip that toggle to the new controls and be good to go, assuming you’re using a control where the syntax hasn’t changed between the old and new controls. This issue that I heard from the dev that worked on implementing these block controls is noted at the bottom of this page:

Updating directly from legacy controls to new controls in an existing block is not recommended, since any previously saved values associated with that block in your page builder might have a different format than the one expected by new controls. The safe way to migrate a block is to create a new one.

So from my understanding, it’s not that there’s an incompatibility between the old and new syntax, it’s just that when you edit block controls on a page, that data gets saved on the page in a certain format, which for some controls might be a different format than the new controls expect, which could cause issues. It would definitely be cool to have a migrate button, but given the limited number of Blocks users currently in the beta and the dev work that would need to go into the migration button on a product that’s not currently generating revenue, I doubt that in this case it would make much sense to build a migrate button. But luckily, for the most part, this should be a simple enough transition to make and in some cases might be as simple as just flipping that toggle. Once the new controls are stable, they’ll become the default and the legacy controls will eventually be fully removed before launch, so this will just be a one-time transition that kinda comes with being a beta user of a product.

So it will be required to migrate from legacy control eventually?

Yeah exactly, legacy controls will be going away before the official launch. Check out this article for an explanation of how the new controls are different from the old ones and why we’re making the transition. From a user perspective, it doesn’t look like much is changing with these new controls, but the implication of the switch is pretty significant when it comes to being able to support more page builders and displaying controls in more places than just the page builder. I’ll be sending out an email to beta users shortly to let them know what’s up with the new controls, I was just waiting on a few stability patches for those new controls.