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

Video not uploaded to Cloudflare after importing entry (with assets) with FeedMe #12

Open
arifje opened this issue Sep 6, 2024 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@arifje
Copy link

arifje commented Sep 6, 2024

In addition to my previous issue we also noticed entries that are imported from another site with FeedMe, that contain assets (also in a Matrix) are also not uploaded to Cloudflare.

@arifje
Copy link
Author

arifje commented Sep 16, 2024

Any idea when this is going to be checked?

@nitriques
Copy link
Member

@arifje Oh! We never tried to import videos.

Do you have auto upload turned on ? If not, that might be the reason why.
If you do have it, you should also see something in your queue....

@nitriques nitriques added bug Something isn't working help wanted Extra attention is needed labels Oct 2, 2024
@arifje
Copy link
Author

arifje commented Oct 23, 2024

Yes it's all turned on, but my guess is that you're using the wrong event when assets are uploaded. There are different ways to approach this. I've built a plugin based on this one, but for uploading assets to Bunny Stream CDN, which works like it should work, and I am using this one:

Event::on(
	Asset::class,
	Asset::EVENT_AFTER_SAVE, 
	function (Event $event) {
        }
);

This triggers when uploading an new assets (drag and drop, but also when importing with FeedMe).

@nitriques
Copy link
Member

Hey @arifje

We ... do ?

Element::EVENT_AFTER_SAVE,
?

After save is declared in the Element class : https://github.com/craftcms/cms/blob/40e7b4b5bcaaaf841cc69339451e8eb154c2f663/src/base/Element.php#L692

Asset::EVENT_AFTER_SAVE work because Assets extends Element
https://github.com/craftcms/cms/blob/40e7b4b5bcaaaf841cc69339451e8eb154c2z663/src/gql/types/elements/Asset.php#L21

I order words: it's the same string.


If the upload job is not created, it may be due to one of the following conditions:

public function autoUpload(ModelEvent $event)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants