Apify & CrawleeA&CApify & Crawlee
Powered by
RapidTech1898R
Apify & Crawlee•9mo ago•
8 replies
RapidTech1898

Writing pdf / jpeg / zip to key-value-store?

Hello - i would like to store a file like pdf / image / zip in a key-value-store -

I can open the key-value-store with:
kvs = await Actor.open_key_value_store(name='my-cool-key-value-store')

But how can i write a pdf / jpeg / zip to this key-value-store now?

Here:
https://docs.apify.com/sdk/python/docs/concepts/storages
i can only see some examples for text / json / csv
await kvs.set_value('automatic_text', 'abcd')
await kvs.set_value('automatic_json', {'ab': 'cd'})
await kvs.set_value('explicit_csv', 'a,b\nc,d', content_type='text/csv')

How can i do this for pdf / jpeg / zip?
And is there somewhere an overview which content_type are possible?
Working with storages | SDK for Python | Apify Documentation
The Actor class provides methods to work either with the default storages of the Actor, or with any other storage, named or unnamed.
Working with storages | SDK for Python | Apify Documentation
Solution
I think this is a list about the possible MIME Types:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types
MDN Web Docs
Common MIME types - HTTP | MDN
This topic lists the most common MIME types with corresponding document types, ordered by their common extensions.
Common MIME types - HTTP | MDN
Jump to solution
Apify & Crawlee banner
Apify & CrawleeJoin
This is the official developer community of Apify and Crawlee.
13,739Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
ellativity

**The Apify $1M Challenge is over!** For everyone who joined yesterday’s Award Ceremony livestream for the Apify $1M Challenge, thank you for your enthusiastic drumrolls in the chat and positive vibes. We were really feeling the excitement and celebratory mood! If you missed the stream or just want to rewatch the key moments again, here’s the replay link https://www.youtube.com/watch?v=eEDV-5X43Gg (ngl, the replay is not the same without your live chat) And, if you didn’t check the email that should have landed in your inboxes, we’d love to hear about your experience of participating in the Apify $1M Challenge. **<a:alerthulk:1468892073917939713> Win one of five $100 Visa gift cards by completing the end-of-challenge survey here: https://apify.typeform.com/to/mjoMaZqD** Thank you again to everyone who participated in any capacity. The past 3 months have been a wild ride and we feel so grateful to have been on this adventure with y’all. We mean every word when we say how much you’ve impressed us. Thank you all from the bottom of our hearts. <a:keanuthanks:1430839059655426068> Saurav and Ella xoxo PS - if you just want to jump to the spoilers, a full list of winners is available at https://apify.com/challenge 🏆

ellativity · 4d ago

ellativity

**You are invited** ... to celebrate all the achievements of the Apify $1M Challenge with us on Wednesday, February 4 at **8 AM PT / 11 AM ET / 4 PM GMT / 5 PM CET / 9:30 PM IST / 12 AM +1d CST** We will be announcing winners of the Grand Prizes, as well as regional winners and much more, with especially good news for all participating developers. 🏆 We look forward to sharing with you all! 🎉 More info here: https://luma.com/6c1493t0

ellativity · 2w ago

ellativity

Hi @everyone 👋 I'm hanging out in https://discord.com/channels/801163717915574323/1430491198145167371 for the next 45 min, if you want to discuss the end of the challenge or anything else.

ellativity · 2w ago

Similar Threads

Store image to key-value-store?
RapidTech1898RRapidTech1898 / apify-platform
9mo ago
Cannot create record in key-value store
HallHHall / apify-platform
15mo ago
How to access key-value-stores via api?
ordinary-sapphireOordinary-sapphire / apify-platform
3y ago
How to bulk download content from the key-value store?
injured-turquoiseIinjured-turquoise / apify-platform
3y ago