0
votes

I created a custom portlet for fileupload to upload files of type (.pdf, .doc, .txt, .docx).

After that I created another portlet in which I give a static URL to for these files for download, but it says file not found.

If I restart sever. files are downloaded and in local server it works fine without restart but on live server I need to restart server and only then the files are downloaded.

<form action="http://localhost:8080/CompanySidePortlet-portlet/gulfdiceResumes/<%=jobpost.getResume()%>" method="post">
    <button style="BACKGROUND-COLOR: lightblue; WIDTH: 25%; HEIGHT: 26px">Download</button>
</form>

this is form for download.. I have given URL against localhost on live site.

Environment: Liferay 6.1 with Tomcat

1

1 Answers

0
votes

Perhaps Tomcat uses some kind of CHMOD when the remote server is started, you could try with File tempFile= File.createTempFile("tempTest", ".pdf"); and see what it gives you

also, is that path really correct?