Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attachment support for "Attachment" columns in Airtable #21

Open
2 tasks
KalobTaulien opened this issue Jan 28, 2021 · 1 comment
Open
2 tasks

Add attachment support for "Attachment" columns in Airtable #21

KalobTaulien opened this issue Jan 28, 2021 · 1 comment

Comments

@KalobTaulien
Copy link
Collaborator

I noticed recently there's a new "attachment" column type in Airtable. I haven't looked into using it yet, but I suspect we can use it to support images and documents.

Acceptance Criteria:

  • Must support images as this is the highest demanded feature right now
  • Must support documents as that's part of the "attachment" field.
@RealOrangeOne
Copy link
Contributor

Had a look into this for file-based attachments, and it should be reasonably simple to implement:

  • Custom document model, so the Airtable attachment id can be stored for future reference
  • Custom serializer to map between Wagtail documents and Airtable attachments:
    • For import, this'll require downloading the file at the specified URL into the document's file
    • For export, just the Attachment ID needs to be returned for existing objects. For new ones, it'll require sending up a public URL for the document (.file.url should be fine)
  • Ensure M2M models are correctly updated and diffed when inserting.

Besides the final point, I'm sort of expecting to be able to do this without modifying the library at all, and even that's only a guess. I'd expect something similar to work for images.

Attempting in the next few weeks - I'll report back my findings!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants