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 8069205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:56:50+00:00 2026-06-05T12:56:50+00:00

Is it possible to upload a 0 byte file to Amazon S3? My standard

  • 0

Is it possible to upload a 0 byte file to Amazon S3? My standard response would be to not allow it, but I have a site that would like to allow users to upload blank .txt files, which happen to be 0 bytes.

Amazon returns a Malformed XML response:

<Error>
<Code>MalformedXML</Code>
<Message>The XML you provided was not well-formed or did not validate against our published schema</Message>
<RequestId>234...</RequestId>
<HostId>2309fsdijflsd...w32r09s</HostId>
</Error>

I’m using boto==2.3.0 with Flask==0.8

  • 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-06-05T12:56:52+00:00Added an answer on June 5, 2026 at 12:56 pm

    Yes, it’s possible.

    >>> import boto
    >>> c = boto.connect_s3()
    >>> b = c.lookup('mybucket')
    >>> k = b.new_key('empty')
    >>> k.set_contents_from_string('')
    >>> for k in b:
           print k.name, k.size
    ...
    empty 0
    ...
    >>>
    

    At least that works for me. The error you are getting suggests something else is going wrong.

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

Sidebar

Related Questions

is it possible to upload a file and subsequently when receiving response download the
Is it possible to upload a .zip file to iCloud , and then have
Possible Duplicate: Upload photo to users profile from photo URL, not input file field
Is it possible to upload file in facebook fbml (not iframe) using Ajax ?
I would like to upload a directory from an EMR local file system to
Is it possible to upload file types like .psd, .eps, .zip, .txt, and so
Is it possible to have growing files on amazon s3? That is, can i
Is it possible to upload a file to another server or pass a file
Is it possible to upload an audio file (i.e. mp3, flac...) to the the
Possible Duplicate: how to upload a audio file from iphone documents folder to server

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.