Attach AVI file
Can I allow users to attach a small (2M) avi file to a question?
![](https://secure.gravatar.com/avatar/5e7228af210c0ba1976b83c58f16e172?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2Fc930eecd01935feef55942cc445f708f.jpg&r=g)
Ok. Thank you very much. It is the most important aspect of my forum as all users will be uploading a small AVI file for review from other members. Great service so far! Thanks!
![](https://secure.gravatar.com/avatar/5e7228af210c0ba1976b83c58f16e172?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2Fc930eecd01935feef55942cc445f708f.jpg&r=g)
Hi Rahul … sorry to bother you again … are you still able to post the instructions for this? Thanks.
Yeh, will post it, partially written.
Here is the code, you need to improve this a bit like file size etc.. But I will suggest not to allow video upload in WP, instead host on youtube or other video share site.
https://gist.github.com/rahularyan/6e035bc2d30281c67400
![](https://secure.gravatar.com/avatar/5e7228af210c0ba1976b83c58f16e172?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2Fc930eecd01935feef55942cc445f708f.jpg&r=g)
Thank you very much! Do I just add this to my Plugin folder?
your theme function.php
![](https://secure.gravatar.com/avatar/5e7228af210c0ba1976b83c58f16e172?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2Fc930eecd01935feef55942cc445f708f.jpg&r=g)
Hi Rahul, nothing happens when I add the code. In fact, I lose all functionality in the Ask Question field – the text editor, image upload option, etc. are now missing.
The Ask Question field now simply says: Write – No Field Found
updated code.
![](https://secure.gravatar.com/avatar/5e7228af210c0ba1976b83c58f16e172?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2Fc930eecd01935feef55942cc445f708f.jpg&r=g)
Hi Rahul … you’re lightning quick!
I am very sorry to keep bothering you, but now the following is happening:
– After asking a question, no question title or link shows up on Questions page. Only ‘Scott asked 1 min ago’. But nothing else.
– Ask will not allow a question to be asked without uploading a file. I still need user to be able to ask a question without uploading a file
– What part of the code would I modify to increase MB if necessary?
No rush. Thank you so much for your amazing support.
Scott
Yes you can. I will answer this question in morning.