Is it possible to import an html file into MIT

thank you

@TIMAI2 Hello! I have a quick question regarding this. My html file is slightly above 5mb (5.3 mb) and it won't load to the assets so I zipped it and tried. it loaded but now when I use "http://localhost/myfile.html" it says 404 not found. Do you know how to load a zip or 7z file containing the actual html to be used in the assets? Thanks!

5MB html file? What's in this file? If you have any java scripts and css in this file then separate them into separate files.

It's a small game I made in scratch and that I am now trying to display in the webviewer. No css file. Just converted the scratch file into an html file.

It is too big to load as an asset. You will need to download the file on first run of the app.

Did you use TurboWarp to turn your Scratch code into a html file? Please let us know if it works when you use it in App Inventor.

HA. I saw this while searching the community "Upload to where? If you want to upload it to assets, there is a 1MB (or at most 5MB) limit that can be bypassed by using 7-Zip or WinRAR. However, the aia size cannot be larger than 30MB (on the main AI2 server)." which was a respone in this thread How do i upload videos? by @Anke so I thought it might be possible but I guess not. Thanks anyways!

@Peter Yes indeed I used turbowarp to convert my scratch code to html. i can confirm that it works well in app inventor because I have another project where the html file is less than 5mb that I was able to load to the asset and then call it using a webviewer. It worked perfectly on the emulator and when I downloaded the apk to my phone :slight_smile:

This is great. It opens up a lot of possibilities for Scratch/TurboWarp users to share their projects. Can you share the aia of the project you made?

1 Like

@Peter Indeed! It's great to have a way to navigate between these two amazing platforms. I am still actively working on my scratch project. I was simply testing with what I have so far to see how/if it worked in order to plan adequately. I'll share it when I am done :slight_smile:

Maybe you could do a tutorial/guide how to get from the scratch project, to the html file and then into App Inventor and get it running.

@Peter That's a good idea! I'll attempt to make one when I am done working out some of the obstacles I am encountering such as the asset file size limit and displaying keyboard on mobile for projects that require typing. Might be of use for someone :slight_smile:

1 Like

Of course, it is possible. So where is the problem?

@Anke my html file is 5.3 mb and so i can't load it in asset. I zipped it using 7z as a zip file and tried also as a 7z file and was able to load it in asset. However when I try to call it using the webviewer and the "http://localhost/myfile.html" I get error 404 not found

Oh I get it now! Okay I am going to try this way and report back. Thanks!

@Anke I followed the steps 1 thru 5 as indicated in the link you provided. This time when I opened the project the html showed in assets BUT won't load once called via webviewer. I then tried the same process with another file that is less than 5 mb and it worked fine which indicates to me that it still won't let me have the 5.3 mb html file as assets even though it appears as it loaded it?
Furthermore, when I click on the 5.3 mb html file in asset and select download to my computer nothing happens while when I do the same thing with the 3.4 mb html file it downloads it to my computer.

@themplanetz Post the aia or send it to me via PM.

@Anke It works! I had a spelling error in the filename when calling it in the webviewer :man_facepalming:t6: . While renaming the files to make it more understandable to you before posting it here I realized that and tried it again with the corrected spelling and it worked fine. thanks so much!!!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.