gitana / alpaca

Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
http://www.alpacajs.org
Other
1.29k stars 371 forks source link

Pre populate the file field, is it possible? #684

Open MacRayy opened 5 years ago

MacRayy commented 5 years ago

Hello,

I have an alpaca generated form and I have some pre-populated fields in it, all of them text or select fields. I used the default property to give them a default value on render and it works fine.

I also have some file type fields which I would like to pre populate. I tried to use the default property or the data object for this process but it doesn't seem to work. I know the browsers do not support the pre population of the file inputs but I thought it is possible through alpaca. Can you please give me any suggestion in this topic?

thanks

codek commented 5 years ago

I wouldn't have thought so. this is a security feature - to stop server side requests grabbing a file off the client.

Also; there's no way alpaca can workaround what a browser does not support!

britisharmy commented 1 year ago

@MacRayy Did you find a way to pre-populate upload field?