Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7068369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:18:55+00:00 2026-05-28T05:18:55+00:00

I am trying to create an app that sends a video file to a

  • 0

I am trying to create an app that sends a video file to a encoding service an from the encoding service to an AWS bucket. This would required me to make the file available to a function that handles the upload and update the url of the fil location before saving the object from the admin.

The upload to encoder process returns information in JSON format that show errors or success. I have had no trouble with trying it out on the client side of the site. However I am not quite sure how to go about it using Django’s admin.

I have looked at the docs and found the ModelAdmin.add_view(). I am not sure how I can get the name and the path of the uploaded file since this is required for the function uploads to the encoder.

I realize that it is probable best to save all the other information once the process is complete since the encoder sends a ping back.

How do I access the uploaded file to so I can run the encode function on it and is the a way to save all the other information when the service receives a ping back from the service?

Edit:

As requested a timeline/flow of events.

This is how it works right now in the front end:

  • File is uploaded
  • file_upload_handle checks file size and duration
  • file is uploaded to encoder(during upload the encoder service sends JSON with status info)
  • the encoder sends the file to AWS and a pingback to the server on success

What I am trying to make sure that the uploading to the encoder is done outside of models.py since it returns some import information in the JSON response which can be used to throwback an error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:18:56+00:00Added an answer on May 28, 2026 at 5:18 am

    It would probably be better to create a custom storage.

    If you only want to override the save function of the admin, then you should override save_model():

    def save_model(self, request, obj, form, change):
        """  
        Given a model instance save it to the database.
        """
    
        # your custom stuff here, this is the file path, change "upload_field_name"
        # by your actual FileField name
        obj.upload_field_name.path
    
        obj.save()
    

    This code is taken from django/contrib/admin/options.py, which presents many methods you can override.

    Or, you could connect a function to the pre_save signal as such:

    from django.db.models import signals
    
    def encode_upload(sender, instance=None, created=None, **kwargs):
       # your custom stuff here, this is the file path, change "upload_field_name"
       # by your actual FileField name
       instance.upload_field_name.path
    
    # change YourModelClass by the name of your actual model class
    signals.pre_save.connect(encode_upload, sender=YourModelClass)
    

    This will make encode_upload to be called before an instance of YourModelClass is saved. Be it in the admin, in other views, anywhere save() is called.

    Note that the slot (function/callback connect to the signal) should be connected when the site is started. Use it in models.py for example.

    Learn more about signals.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an app for Android that simply sends a command to
Trying to create my first iPhone app that would play back audio. When I
what i'm trying to do this this. Simply create a C# windows app that
I am trying to create an app that will allow me to stream video
I am trying to create an app that will display articles from an online
I am trying to create a small desktop app that sends out e-mails to
I am trying to create a simple app that displays a list of items
I'm trying to create a WinForms app that takes a screenshot on a set
I'm trying to create a C# form app that will allow me to use
I'm trying to create a rails web app that does not use ActiveRecord framework

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.