Foren

Unable To Upload The File To Liferay More than 500MB

Balu Bollam, geändert vor 7 Jahren.

Unable To Upload The File To Liferay More than 500MB

New Member Beiträge: 21 Beitrittsdatum: 23.10.16 Neueste Beiträge
Hi Everyone,

I am using lifery 7.....

Iam uploading file using UploadPortletRequest in myportlet class,,[getting files from jsp inputype=file To my Action class)]
Initially iam able to upload only 100MB .......now i have increased upload size in serverAdministration-->Fileuploads
Overall Maximum Upload Request Size =1004857600 (means 1000MB is this correct please suggest)

Now iam only able to upload upto 500MB or below.....How i need to increase the size....Even i give 50004857600 iam getting null in my Action classs..


Please anyone suggest i want to give maximum file upload size to 1.5GB ....for that what i need to give in -->Overall Maximum Upload Request Size
Here iam getting multiple files to my action class.....Each file can be around 1GB....
Here Is my code
public void actionRequest(ActionRequest request, ActionResponse response) throws IOException {
themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
user=themeDisplay.getUser();
try {

logger.info("Test DATA::::" + request.getParameter("fname"));

UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(request);
Map<String, FileItem[]> files= uploadRequest.getMultipartParameterMap();

for (Entry<String, FileItem[]> file2 : files.entrySet()) {
FileItem item[] =file2.getValue();
for (FileItem fileItem : item) {
String sourceFileName = fileItem.getFileName();
logger.info("###CHANGED#####source file name -" + sourceFileName);
File file = fileItem.getStoreLocation();
logger.info(file.getAbsolutePath());
logger.info("DONE");
}

}


Here The file is uploading to tomcat/tmp......once the restriction works.....I will upload To Bookmarks...


Please anyone help me out how much i need to set upload limit for getting 1.5GB file size allowed




Thanks And Regards
Balu
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Unable To Upload The File To Liferay More than 500MB

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
Actually I'd avoid this if you can.

An upload of this size is going to tax your entire infrastructure. For example, I don't think the upload streams to the disk right away, I think it gets held in memory until the code to save the file gets invoked.

The incoming filters may be inspecting the stream as it is coming in and they may not handle such a large file.

Finally, there's the rest of your infrastructure. Unless you have a super-fast network pipe, something like this will go over like a DOS attack. Tomcat and whatever other servers/services sit between the user uploading and your system, you have to understand what configuration and tweaking may need to happen to them to accommodate such a large file.

For all these reasons, it's better just to tell your manager "hey let's not do this". Find some other reasonable path for large file upload then figure out how to make those big uploaded files available to Liferay.
Balu Bollam, geändert vor 7 Jahren.

RE: Unable To Upload The File To Liferay More than 500MB

New Member Beiträge: 21 Beitrittsdatum: 23.10.16 Neueste Beiträge
Hi David,


Thanks For Your Reply....As u suggested i will check other way to upload i.e direct streaming