cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Translate the entire conversation x

We want to add file from local system to the server as a secondary attachment to wtDocument type

KOEL_PLM
12-Amethyst

We want to add file from local system to the server as a secondary attachment to wtDocument type

We have wrote a html code to upload file as follows:

 

 <h3>File Upload</h3>
<form action="UploadServlet" method="post" enctype="multipart/form-data">
         <input type="file" name="file">
         <button type="submit">Upload File</button>
</form>

 

Need code in UploadServlet.jsp to fetch the document and attach it to the secondary attachment of the current wtDocument.

 

Thanks!

 

 

2 REPLIES 2
avillanueva
23-Emerald I
(To:KOEL_PLM)

Curious what is wrong with the normal check out and edit interface to upload via attachments?

I’ve written lots of code to get content and to add content.

I take it “name” in your form it the full path to the file? If yes, and you have the document (which I guess is the the document you are running the jsp from) to add the file from a given path as an attachment to the document is no problem.

 

Does that accurately describe the big picture?

If yes, I’d second what Mr Villanueva wrote.

 

If no, how about describing your use case.

Announcements
Top Tags