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

Non images are being captured by the plugin #84

Open
sinabahram opened this issue Mar 4, 2021 · 2 comments
Open

Non images are being captured by the plugin #84

sinabahram opened this issue Mar 4, 2021 · 2 comments

Comments

@sinabahram
Copy link
Contributor

We need to only submit images to Coyote, but right now all attachments e.g. PDF files, M4A files, mp4 files, are being submitted.

I suggest filtering on popular image extensions for now.

@jkva
Copy link
Contributor

jkva commented Mar 29, 2021

I'm unable to reproduce this. Implementation-wise there exists explicit filtering on anything not of mime-type image/*.
When creating a new organisation and importing existing attachments and posts including PDF attachments, PDFs are not imported.

In an older organisation I have seen PDFs that were once imported, and I'm inclined to think this was a glitch during older imports. I've checked the mime-type that WordPress used for those imported PDFs, and those seemed to be correctly set to application/pdf.

I'm keeping this issue open for now, perhaps I can reproduce it at another time.

@jkva
Copy link
Contributor

jkva commented Jul 21, 2022

This logic should be moved into the main WordPressPlugin class and generalised such that a WP_Post or ID can be provided and checked whether it should be processed. This relates to #90.

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

No branches or pull requests

2 participants