tomitrescak / meteor-uploads

MIT License
295 stars 41 forks source link

Uploading on form's submit button #195

Closed sylverfyst closed 8 years ago

sylverfyst commented 8 years ago

I'm looking to include this package in a form where a user fills out other information prior to uploading their photos, the end of the form is as such:

<div class="file-field input-field">
                    {{> upload_semanticUI }}
                    <!--<input id="createListing_imageUpload" type="file"> -->
            </div>
            </div>
            <div class="mdl-cell mdl-cell--1-col mdl-cell--8-col-tablet" style="display:inline-block;"></div><!-- Spacer -->
            </div>
          </div>
          <div class="mdl-card__actions mdl-card--border">
            <button class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">Sumbit</button>
          </div>
        </form>

Any way I could have the upload start on the form's submit button rather than on the upload form's button? I think I might have to create a custom template and have it done that way, but if there's a simple way to do this I'd appreciate it.

rozick commented 8 years ago

I have the same issue. If you find a solution please let me know!

tomitrescak commented 8 years ago

Guys, this question is asked over and over again in this forum, all I do is search for duplicates. The answer is to manually trigger the upload button behaviour using a jquery call, or to call Uploader.startUpload().