Search code examples
meteormeteor-autoform

upload video using afquickfield


Hello I wanted to know that is there a way to upload a video using afqucikfield. I have done this. It works for images but it does not works for videos

{{#if afFieldValueIs name='articleType' value='video' }}
                      <!-- <p>hello</p> -->
                      <!-- <input type="button" value="videoId"> -->
                      {{> afQuickField name="videoId"}}
                  {{/if}}

Can somebody tell me what am I doing wrong and how should I upload video. Thanks

Update

I am storing all the files on S3


Solution

  • I figured out what I was doing wrong. I am using FS collection and I was only allowing it for images. What I needed to do was to allow it for videos to like this

    Videos = new FS.Collection("videos", {
      stores: [imageStore],
      filter: {
        allow: {
          contentTypes: ['video/*'] //allow only video in this FS.Collection
        }
      }
    });