Using a set of assets as a custom component

Hi all,

I have downloaded this site/web app from github. When I open “index.html” on my local computer, I get a nice little web app.

The webapp/website is comprised of many different files (mostly JS files).

What would be a good way to use a site/app like this in an Anvil app?

I’ve considered that I could (1) upload all files one-by-one into assets, or upload a ZIP to assets or DataTables and later convert the contents to media object.

Can anyone give me a little nudge in terms of what they think would work best?

If you’d like to add a bunch of files to your assets, the easiest way is probably to check the app out using Git, then add everything you need to the theme/assets directory! (This could get a bit heavy if the files are too big, but it’s OK for a little HTML and JS)

Alternative approaches include, as you say, adding them to your Data Tables, but for this purpose I’d use Assets.

1 Like

Thank you so much. I will indeed do that!

I’ve added the assets mentioned above; however, the app tells me that it is too big to save. The assets are 24MB in total. Is this an expected error?

Hi @alcampopiano,

24MB is big enough to cause issues, especially if there are a number of commits. You could try squashing some commits together.

Alternatively, I’d look at adding some of the assets to data tables.

1 Like

The got into the app well enough but I couldn’t save the app once I was back in the IDE. My understanding is that that site would have to have access to all of those files to work properly but I’m likely misunderstanding something. It’s not a major issue for me right now thankfully.