Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

490
Views
¿Cómo guardar el archivo .docx en S3?

Estoy usando python-docx para crear un documento. Quiero guardar este archivo en AWS S3. Actualmente, lo que estoy haciendo es crear un archivo .docx y guardarlo localmente usando document.save('filename.docx') . Luego, use s3.meta.client.upload_file('/path/to/file/filename.docx', bucket, 'filename.docx') para guardarlo en S3. ¿Hay alguna forma de guardar el archivo .docx directamente en AWS S3 sin guardarlo localmente?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Sí tu puedes. Como sugirió @ewong, aquí hay un fragmento de código de muestra:

 import boto3 from io import BytesIO from docx import Document s3 = boto3.client('s3') document = Document() # ... with BytesIO() as fileobj: document.save(fileobj) fileobj.seek(0) s3.upload_fileobj(fileobj, 'your-bucket-name', 'your/s3/key')
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!