-
Notifications
You must be signed in to change notification settings - Fork 57
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
Get video URLs in Wagtail API #16
Comments
I thought of trying to implement this: https://github.com/wagtail/wagtail/blob/master/wagtail/wagtailimages/views/serve.py into wagtailvideos, will update if I get something :) |
I don't have much experience with the Wagtail API, but it will not have to be integrated in the same way as wagtailimages. The complicating factor with wagtailimages is the resizing step - allowing people to resize any image with any filter would open a potential DDoS vector. The same is not true of wagtailvideos, as all the transcoding is done in a separate process. The URL of the video file should be accessible as for transcode in video.transcodes.all():
transcode.file.url Does this help? |
Hi @timheap, thanks for your answer, in fact it does help a lot. I will try to implement it and get back with my solution here (if it can help others). Btw, do you know the status on this issue: #9 ? |
#9 is a feature we would like to have, but we currently have no time to implement. No one is working on it yet. |
Closing with no addition because @timheap answer was perfectly accurate. |
Hi,
Sorry to ask something maybe dumb or already done, but I was wondering if it was possible to get the video url directly into API results for a content ?
I was able (with some help from wagtaildemo repo and wagtail documentation) to setup something similar for images, but this app seems (obviously) a bit different.
Do you guys could have an idea about how to achieve this ?
I did the following for images: http://docs.wagtail.io/en/v1.8/advanced_topics/images/image_serve_view.html#generating-dynamic-image-urls-in-python
I did look into the wagtailvideos code, but didn't find such a function (and it is a bit more complicated with various transcoded versions). As you could understand, I am quite new to django/wagtail universe, so sorry again if this is a dumb question.
Thanks a lot in advance
(and thanks @TakeFlight for the work done on every wagtail apps, almost each one really rocks !)
Regards
Fab
The text was updated successfully, but these errors were encountered: