Example code to test media storage? #4039
-
Hi there! From what I can tell, the default app UI doesn't have a media upload interface. I would like to test out the media storage mechanism as I'm on the Azure team at Microsoft and want to make sure that Azure storage works well. Does anyone have example code that utilizes the media storage? If not, my plan is to add an ImageField to the user model/form, but I wanted to check first. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
That is correct, the default project doesn't have any filefield by default.
Cool! Thanks for helping out, especially since I'm not using Azure myself. The feature was contributed by the community recently.
Yes, that should be a good minimal working example. You should be able to upload from the admin if you don't want to touch the front-end part. |
Beta Was this translation helpful? Give feedback.
-
In case anyone runs into this thread and wants to do something similar... Here's the commit where I added the ImageField: pamelafox/cookiecutter-django-output@217dda7 Azure Storage worked fine, with a container configured for Public read access to blobs. Here's the Bicep configuration for the storage: |
Beta Was this translation helpful? Give feedback.
That is correct, the default project doesn't have any filefield by default.
Cool! Thanks for helping out, especially since I'm not using Azure myself. The feature was contributed by the community recently.
Yes, that should be a good minimal working example. You should be able to upload from the admin if you don't want to touch the front-en…