title: Amazon S3 Upload Whats does Key do
body: <p>I am really confused as to what the key value should be when using amazon s3 here is my code.</p>
  
  <pre><code>   &lt;form action="http://bucket.s3.amazonaws.com" method="post" enctype="multipart/form-data"&gt;
  &lt;input type="text" name="key" value="{filename}" /&gt;
  &lt;input type="text" name="acl" value="public-read" /&gt;
  &lt;input type="text" name="content-type" value="text/plain" /&gt;
  &lt;input type="hidden" name="AWSAccessKeyId" value="Amazon Key" /&gt;
  &lt;input type="hidden" name="policy" value="ewogICJleHBpcmF0aW9uIjogIjIwMTItMDEtMDFUMTI6MDA6MDAuMDAwWiIsCiAgImNvbmRpdGlvbnMiOiBbCiAgICB7ImJ1Y2tldCI6ICJpcIHsiYWNsIjogInB1YmxpYy1yZWFkIiB9LAogICAgWyJlcSIsICIka2V5IiwgIntmaWxlbmFtZX0iXSwKICAgIFsic3RhcnRzLXdpdGgiLCAiJENvbnRlbnQtVHlwZSIsICJ0ZXh0LyJdLAogIF0KfQo=" /&gt;
  &lt;input type="hidden" name="signature" value="fGWi1jKU+hKZKbCIL1eD0=" /&gt;
  &lt;input name="file" type="file" /&gt;
  &lt;input name="submit" value="Upload" type="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Ok so i am using this service to generate my policy etc because i havent got a clue how to do this manually. </p>
  
  <p><a href="http://s3.amazonaws.com/doc/s3-example-code/post/post_sample.html" rel="nofollow">http://s3.amazonaws.com/doc/s3-example-code/post/post_sample.html</a></p>
  
  <p>This works and gives me everything to upload. But when i upload my files they are always call {filename} and not the actually filename says picture.jpg. I know this is down to this line.</p>
  
  <pre><code>&lt;input type="text" name="key" value="{filename}" /&gt;
  </code></pre>
  
  <p>I want it to take that value off the actually filename i am uploading.</p>
  
  <p>What am i doing wrong very confused.</p>
  
  <p>I have tried leaving it blank but i get this error.</p>
  
  <blockquote>
    <p>InvalidArgumentUser key must have a
    length greater than 0</p>
  </blockquote>
  
  <p>I want it to work this out for me????</p>
  
  <p>Any Help Please</p>