I'm having a Django project, where a FileField is applied for storing a video file (mp4).
The Video File is actually stored on AmazonS3.
The video file is then showed on the corresponding HTML, though Django DetailView, with an HTML5 video tag.
<video width='50%' controls>
<source src="{{ object.video_sample.url }}" type="video/mp4">
Your browser does not support the video tag.
</video>
The video is played well both locally (local ip) on and on deployed server.
However, I'm keep getting this annoying error message on terminal/logs:
Exception happened during processing of request from (...)
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 650, in process_request_thread self.finish_request(request, client_address)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 720, in init self.handle()
File ".../env/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 171, in handle self.handle_one_request()
File ".../env/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 179, in handle_one_request self.raw_requestline = self.rfile.readline(65537)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer*
I think that it related with the fact user leaves the HTML page while the video is still open.
Do you know how to get it resolved?
BR,
Shahar