Skip to content

Recommended way to override attachment trigger #71

Description

@skyhirider

I'm setting up a robot that needs to capture and download attachments from a site that does not use the content disposition header in some cases.

if (attachmentHandler_ != null && Attachment.isAttachment(webResponse)) {
final WebWindow w = openWindow(null, null, webWindow);
final Page page = pageCreator_.createPage(webResponse, w);
attachmentHandler_.handleAttachment(page);
return page;
}

Is there a way or recommended approach how to extend this trigger without needing to override the webclient and attachment class?

I could change the loadWebResponseInto method but would have to keep track of any upstream changes and I was told there might be some issues with calling protected methods as well.

Also, apologize if this question should be brought up on stackeoverflow but it seems that I was banned for six months for having one question marked as -1. Not sure how that works over there.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions