How to upload image using knockout and web API

1,376 views
Skip to first unread message

sakumar...@gmail.com

unread,
Aug 17, 2013, 11:26:54 AM8/17/13
to knock...@googlegroups.com
i have file upload control
 <input type="file" accept="image/*" data-bind="file: imageFile, fileObjectURL: imageObjectURL, fileBinaryData: imageBinary"/>

and i want to upload image with ajax call...
how do i achieve this..i am very new to knockout js

Thanks

Patrick Steele

unread,
Aug 17, 2013, 5:23:32 PM8/17/13
to knock...@googlegroups.com
For security reasons, browsers do not allow javascript to set the file attribute of an input type="file" tag.  The user MUST pick the file by browsing for it.

--
You received this message because you are subscribed to the Google Groups "KnockoutJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knockoutjs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

surendr...@gmail.com

unread,
Dec 17, 2014, 2:55:58 AM12/17/14
to knock...@googlegroups.com, sakumar...@gmail.com

Thanks sir ..
but  how to save image in folder then image name is save in database .
 help me sir..
 i am asp.net developer i want image upload in folder by ajax-jquery . image is save in folder in client side or by server side in dot net or mvc 4 .
 Please sir help me. 

Gunnar Liljas

unread,
Dec 17, 2014, 3:02:13 AM12/17/14
to knock...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "KnockoutJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knockoutjs+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages