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

  • SEARCH
  • Home
  • 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 6469287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:58:23+00:00 2026-05-25T05:58:23+00:00

I have the following template form, containing several variables. <form action=https://me.s3.amazonaws.com/ method=post enctype=’multipart/form-data’ class=upload-form>

  • 0

I have the following template form, containing several variables.

<form action="https://me.s3.amazonaws.com/" method="post" enctype='multipart/form-data' class="upload-form">
    <input type="hidden" name="key" value="videos/{{filename}}">
    <input type="hidden" name="AWSAccessKeyId" value="{{access_key}}"> 
    <input type="hidden" name="acl" value="public-read">
    <input type="hidden" name="policy" value="{{policy}}">
    <input type="hidden" name="signature" value="{{signature}}">
    <input type="hidden" name="Content-Type" value="{{content_type}}">
    <input name="file" type="file"> 
    <input type="submit" value="Upload" name="upload">
</form>

However, as soon as the submit button is hit, the form is sent to amazon, and I’m not able to pass it variables. This is what I’ve been trying to do, unsuccessfully —

    if 'upload' in request.POST:
        policy = base64.b64encode(...)
        signature = base64.b64encode(
            hmac.new('secret_key', policy, sha).digest())
        file = request.POST['files']
        filename=file.name
        content_type=mimetypes.guess_type(filename)[0]

What do I need to do to pass the variables to the form after the POST request but BEFORE amazon processes the form? Thank you.

  • 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-25T05:58:24+00:00Added an answer on May 25, 2026 at 5:58 am

    You should change your form’s action to your django view and in your view you can re-post to https://me.s3.amazonaws.com/:

    In your template

    <form action="http://mywebsite/upload" method="post" ...
    

    In your view.py:

    def upload(request):
        # Your treatment here.
        # Post the data to amazon S3.
        urllib2.urlopen("https://me.s3.amazonaws.com/", your_data)
        ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code in my template: <form action= method=post>{% csrf_token %} {%for
In my .xhtml page, I have the following form: <ui:composition xmlns:ui=http://java.sun.com/jsf/facelets template=./../template/CustomerTemplate.xhtml xmlns:h=http://java.sun.com/jsf/html xmlns:f=http://java.sun.com/jsf/core
I have an included object's form: <form method=post class=object_form id=event-core-form action={% url save_event_core_data event.id
I have created a custom form class and template for my form by following
I have the following code in an action render ( template: 'partial_list_template', model: [messageList:
Are forms that use the POST method required to have CSRF protection? I'm following
I have the following template <h2>one</h2> <xsl:apply-templates select=one/> <h2>two</h2> <xsl:apply-templates select=two/> <h2>three</h2> <xsl:apply-templates select=three/>
I have the following template declaration: template <typename T> void IterTable(int& rIdx, std::vector<double>& rVarVector,
I have the following xsl template that I'm using to group my xsl. The
I have the following code: template <typename T> LuaCall& operator>>(T) { BOOST_STATIC_ASSERT(sizeof(T) == 0);

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.