oTree Forum >

Heroku template rendering error static link

#1 by Victor

Hi everyone,

I'm getting an error that I did not receive before, and I don't really understand it. I wanted to upload and play some videos in my oTree app. I follow the procedure in the documentation where you put the video under "otree_directory\app_name\static\app_name\video.mp4." Next, you add the following lines in your HTML:

        <video width="640" height="480" id="video" controls>
            <source src="{% static "app_name/video.mp4" %}" type="video/mp4">

However, Heroku does not seem to find the video, while locally everything is fine. 

Should I just host the videos somewhere else? Like youtube/dropbox etc?

Thanks in advance!


#2 by Victor

Brief update: After some troubleshooting, I have noticed it does not run the error on every page containing a video. Some pages with videos linked to app-specific static folders do work. However, some do not and raise this error. The code I used to link to the videos is identical. 

I don't think it's limitations on video size. In any regard, I am completely confused right now. I guess one quick way to solve this is to use a video hosting service and link to the videos there. Does anyone have a reliable service for this?

#3 by gr0ssmann

I can recommend just hosting it on your webserver.

Alternatively, you could use the "YouTube nocookie" approach.

Write a reply

Set forum username