Open advany opened 8 years ago
switched to the old version (before jquery fileupload) and it works! How can I debug it.. because I can't figure it out.
+1
+1
+1 Same Problem here. No Errors are thrown ... just doesn't work. Please look into fixing it, THANKS!
I think I know the problem, its the missing iframe plugin. Ill try to create an fix.
@advany GREAT! Thanks man!
Little busy, btw an easy fix is:
meteor remove yogiben:autoform-file meteor add shinn:autoform-file
We can not have <input type=file>
inside <button>
:
http://www.w3.org/TR/html5/forms.html#the-button-element:
4.10.8 The button element Content model: Phrasing content, but there must be no interactive content descendant. ---> Interactive content is content that is specifically intended for user interaction. ⇒ a, audio...
Fix is to replace button with span (tested in chrome & firefox)
Anybody can use code like this:
<template name="afFileSelectFileBtnTemplateFixed">
<span class="btn btn-default af-select-file js-af-select-file">
{{label}}
<input type="file" class="js-file" accept="{{accept}}">
</span>
</template>
// client.js
Template.afFileSelectFileBtnTemplateFixed.onRendered(function () {
$('.js-file').fileupload();
})
And use selectFileBtnTemplate
inside schema:
...
avatar: {
type: String,
autoform: {
afFieldInput: {
type: 'fileUpload',
collection: 'Images',
selectFileBtnTemplate: 'afFileSelectFileBtnTemplateFixed',
label: 'Choose file',
accept: 'image/*',
},
},
},
...
When i use this bugfix i get the following error:
TypeError: $(...).fileupload is not a function
When i use a not Custom Button, Fileupload Dialog is not opened after clicking the Button.
i also don't get a working version have somebody find out more?
@mario589736 @bulleric
I created simple page for testing upload button: http://oa-testupload.meteor.com Checked it with chrome, firefox, ie11, edge (only file selection is worked, upload is disabled by code)
You can reproduce this page with instructions from: https://github.com/isbjorn/test-upload
@isbjorn Thanks!!!!! Its working!
In both internet explorer and firefox, no file dialogue is triggered. Here is an example:
http://islamagenda.nl/events/create
Use a very simple implementation (and no error)