Help serving media files on render

101 views
Skip to first unread message

ASAMOAH EMMANUEL

unread,
Nov 1, 2024, 8:41:33 AM11/1/24
to django...@googlegroups.com
Hi All,
I need help serving media files on render. I already serve static files with whitenoise.
I am able to upload media files but cannot serve them. I get file not found.
If it is not possible, are there other alternatives to s3 bucket.
Thanks in advance.

--
I don't stop when I'm tired, I only stop when the job is done.

RANGA BHARATH JINKA

unread,
Nov 2, 2024, 12:09:27 AM11/2/24
to django...@googlegroups.com

Hi,

You can use cloudinary or Firestore storage bucket to store media files.

Thanks


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/django-users/CABFHQYxovaK2h6S52LOy19uofRzMTAtobY4szMhmGjD2QaZddw%40mail.gmail.com.

Wekesa Sammy Barasa

unread,
Nov 3, 2024, 11:30:52 AM11/3/24
to Django users
Hi,

It is important to separate the media files from your application file system in production for security purposes. You cannot trust your users' input files and therefore you should not be bundled with your application files. So in production, you should use file storage systems provided by various providers.

However, in development, we can get around this by adding the media root as a static file path on the root URL configuration of the project.
To do this we will use the static function from url.static and ensure we are using it only for development purposes.

from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include


urlpatterns
= [ path('admin/', admin.site.urls),
# ... the rest of your URLconf goes here ...
]

if
settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Regards,

Sammy Barasa

Adisa Habeebulah

unread,
Nov 5, 2024, 1:18:44 AM11/5/24
to django...@googlegroups.com
I experienced this recently, try using Idrive 

--

Deepak kumar

unread,
Nov 5, 2024, 4:40:31 AM11/5/24
to Django users
Hello Sir,
Greetings from DRP IT Services.

🌹
We are providing various digital solutions on one platform ( IT - All Rounder ).
💐
We are experts in -

* Website ( Static and Dynamic )
* App (android/iOS)
* Search Engine Optimization ( on page / Off page )
* Search Engine Marketing Ads( google, youtube, Google business,Facebook, LinkedIn )  
* Product Based Ads ( Google, Flipkart, amazon)
* Email Marketing
* SMS Marketing
* Software Development
*  Social Media Management
* IT - All Rounder

💐💐
We wish to work with your esteemed organization.
Kindly give us an appointment so that our senior executive may meet you.

Thanks.
WhatsApp: +91-7054633323
URL - https://www.drpits.com/
Reply all
Reply to author
Forward
0 new messages