'handle them' = 1. recognize that the url that the user clicked is to a file 
that should be downloaded, rather than loaded in the webview.  and 2. download 
the data to a file.

Currently, when I click on a link to a file such as one with a .doc extension, 
my webview calls :
- (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame 
*)frame

and then:
- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error 
forFrame:(WebFrame *)frame

I want my application to download this file.  I assume that I need to access 
the WebDataSource and then the NSData object that represents the file content. 
I need to check the MIME type of the document and determine if it should be 
loaded in the webview or if it should be downloaded.  I'm not sure when exactly 
during the load process I need to check the MIME type of the resource, but it 
seems to me that I should be able to know the MIME type before any of the 
WebFrameLoad delegate methods are called, but I'm not sure how.

On Jan 5, 2011, at 12:59 PM, Mike Abdullah wrote:

> What do you mean by "handle" them?
> 
> On 5 Jan 2011, at 11:47, Michael Thon wrote:
> 
>> I'm looking through the WebKit Programming Guide but I can't find any 
>> documentation on how to handle files that should be downloaded instead of 
>> displayed in the webview.  Can anyone point me to an example or some 
>> documentation?
>> Thanks
>> 
>> _______________________________________________
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
>> 
>> This email sent to cocoa...@mikeabdullah.net
> 

Michael Thon
m...@michaelrthon.com
1935 S. Plum Grove Rd. #214
Palatine IL 60067
USA
847-348-9895



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to