Welcome Guest Search | Active Topics | Sign In | Register

File field control support Options
billyb3434
Posted: Friday, March 21, 2014 12:19:28 AM
Rank: Newbie
Groups: Member

Joined: 3/21/2014
Posts: 6
Hello,

Since there is no other solution to automate the "browse" button in the forms over a file field (file upload field), it would be perfect if this control was able to do it. Any user of EO.Webbrowser has any idea how this can be implemented by the developers?

I vote for a hook to replace the path (maybe thru DOM objects?)
eo_support
Posted: Friday, March 21, 2014 11:59:56 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,203
Thank you very much for your feedback. Yes. That's one of the idea we are considering. Another idea is to provide a unified SetFieldValue method on the WebView class that can be used on all type of fields. In either way we would have to implement something on our end since this does not exist in standard DOM/JavaScript interface.
creality
Posted: Wednesday, February 24, 2016 5:38:09 AM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
Any news on this?

I am automating a form with file upload.

Its possible to automate with javascript? Giving the path to the Local file or something similar.
Its possible to automate with post? If I create a Request object and add some "Post" values(the other fields of form), how i can add or send a local file too? How about a "stream", if the file content is obtained from code?

Thank you very much
eo_support
Posted: Wednesday, February 24, 2016 10:44:28 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,203
Hi,

It is not possible to automate file upload with JavaScript because that would be a serious security issue (people would be able to steal files from end user's computer as soon as they can lure people to visit their website). However with EO.WebBrowser it is possible for you to create a Request object and add post values, including file post values directly. You will need to follow these steps:

1. Use "new Request(url)" to create a new Request object;
2. Use "new PostDataItem(fileName)" to create a file post item, then add it to the request object's PostData collection;
3. Call WebView.LoadRequest to load the request;

Hope this helps. Please feel free to let us know if you still have any questions.

Thanks!

creality
Posted: Thursday, February 25, 2016 7:17:56 AM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
Ok, its good news!

I'll give a try.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.