Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding attachments through service pages

Highlighted
Akies
Occasional Visitor

Adding attachments through service pages

Hi,

I am using HPSD 4.5(sp13).I want that user should be able to attach files through service pages.For this I have Example9 file in the example folder of sp..But I don'nt use how to use the same on web pages..
Request you to help me on the same..

Regards,
Akhil
4 REPLIES
Radovan Skolnik
Honored Contributor

Re: Adding attachments through service pages

The examples do not mention one (but very important) thing: to be able to upload the attachment the file has to be on a filesystem of the SD server! It does not work remotely.

So to be able to upload attachment via WEB you have to create a way to transfer it from the browser to the SD server filesystem (check out Apache framework for example).

To be able to download the file via WEB you have to create something (servlet) that is able to retrieve the attachment from the SD's FTP server and send it to browser. For this you have to know where the FTP server stores the files and what is the directory structure - having look at it you'll instantly find out. However the structure is changed in SP16 onward!

Hope this helps.
Akies
Occasional Visitor

Re: Adding attachments through service pages

Thanks Radovan...Your comments will definitely help..But I am new to jsp coding.So I am unable to show user any way by which he can attach the attachment.Can I use the simple browse tag with value set in IAttachment.addAttachment option?
Please specify as how can I be able to get attachment option.I am going on a sequential order.First we will go for option and then see as how can we upload the same(which u have already explained to me)...

Regards,
Akhil
Radovan Skolnik
Honored Contributor

Re: Adding attachments through service pages

Well, I'm not a JSP coder but to me it seems you're confusing few things.

JSP is a technology where Java classes (SD WEb-API) runs on the server and produces the HTML file(s) that are sent to browser and displayed.

So you'd can call the mentioned method only when the file you want to attach is already uploaded to SD server filesystem. How you get it there is upon you - there's some support for it in Apache framework I mentioned...
Akies
Occasional Visitor

Re: Adding attachments through service pages

I was suggested web console for this.
//Add this to "OnDomLoad" event