Forum Discussion

LoriSims-837662's avatar
LoriSims-837662
Community Member
6 months ago

Help needed with Rise code block and images

Hi Community! I'm loving the code block in Rise, but so far, I have only been successful with inserting the code directly into Rise and thus have to use web-stored images.

I've tried multiple times to use the same code, but with images in a zip file and either it just spins and spins and never loads, or I get an error that I need an index.html file at the root level, which I have.

An example is attached. Any assistance would be greatly appreciated!

12 Replies

  • I don't think I'm quite understanding. Have you seen that images can be imported into the code block? I'm not following why placing the images in a zip would make them easier to use in a code block either.

    • LoriSims-837662's avatar
      LoriSims-837662
      Community Member

      There are two ways to implement a code block...add code or upload a project. I've been successful adding the code directly (and using web-hosted images), but I would like to use images that are not publicly hosted for some projects, so would need to use the upload functionality. I just can't get it to work.

      • AndrewBlemings-'s avatar
        AndrewBlemings-
        Community Member

        Neat, I hadn't explored that feature. In looking at your zip, I think the hang-up may have been introduced when creating the zip file. Your zip's root contains a folder that contains the index file and the image folder, so your index is not in the root of the zip, it's one level down.

        I suspect this may have happened when the zip was created, probably by right-clicking a folder containing the index and creating the zip from the context menu. The zip will need to be created by lassoing the index and image folder directly, and then creating a zip from their context menu.

        Though nothing displays for me when I upload that new zip to a new Rise course, it does upload without error or issue. Hopefully that will get you closer?

  • Thanks Andrew. I found the same. I'll work with it some more, but I was definitely not including the index.html at the root level. You've gotten me one step closer!

    • Souveek's avatar
      Souveek
      Community Member

      Were you able find a solution Lori?

    • DShaw's avatar
      DShaw
      Community Member

      If you haven't seen it yet; this course is really useful Rise Code Blocks

      Make sure when you create your zip file that you are selecting your index.html file and any images, audio, video you want to bundle (that is correctly referenced in the code); then compress them together as a zip file for upload as a project code block.