I am currently coding a web application using Django (4.0) with Django REST Framework for Server-Side Python scripts and NextJS for Client-Side Javascript.
I have a function implemented in Python that helps to upload an image to IPFS and returns an image URI in order to display the image on the web page. Besides that, I have also a Javascript code that does exactly the same but on the Client-Side. What's the efficient way as for the speed and energy consumption to run that function: whether on Client-Side in the browser with JS or better to do this on the Server-Side and return the value through HTTP with DRF?
Note: Client and server are on the same network.