Store real Excel file on serverStore real Excel file on serverhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1078593912024-03-28T19:52:00Z2024-03-28T19:52:00ZRE: Store real Excel file on serverBertrand Malethttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1082373702018-05-14T13:31:36Z2018-05-14T13:31:36Z<div class="quote-title">Olaf Kock:</div><blockquote>I'd just implement a messagebus trigger in the Listener. This way the processing of your file can be done asynchronously and completely decoupled from the pure store operation.</blockquote><br /><br />Thanks for that one! I just wouldn't have thunk about that.<br /><br />Regards.Bertrand Malet2018-05-14T13:31:36ZRE: Store real Excel file on serverOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1080171932018-05-09T18:37:18Z2018-05-09T18:37:18Z<div class="quote-title">Bertrand Malet:</div><blockquote>That confirms want I thought: I'll have to use a listener to get the file's stream and store the file the way I want. I just wanted to be sure that there wasn't another way of doing it.</blockquote><br /><br />Given David's remark about delaying the write of the file, I'd just implement a messagebus trigger in the Listener. This way the processing of your file can be done asynchronously and completely decoupled from the pure store operation.Olaf Kock2018-05-09T18:37:18ZRE: Store real Excel file on serverBertrand Malethttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1079784322018-05-09T08:37:42Z2018-05-09T08:37:42ZHello,<br /><br />and thanks again for your answer.<br /><br />That confirms want I thought: I'll have to use a listener to get the file's stream and store the file the way I want. I just wanted to be sure that there wasn't another way of doing it.<br /><br />Regards.<br />BertrandBertrand Malet2018-05-09T08:37:42ZRE: Store real Excel file on serverDavid H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1078812912018-05-07T16:32:19Z2018-05-07T16:32:19ZNormally one would want to intercept writes using a model listener or service wrapper. In this kind of situation, you can do things with the data before or after the update, including executing logic to invoke external systems.<br /><br />The challenge with files, though, is that you have to intercept the stream and hold it. So if you are processing a 10mb xls file, you have to hold the data during processing. With multiple uploads, you put a strain on resources to hold these during processing.<br /><br />As far as the Liferay doc store goes, Liferay holds meta info about the file, etc. and a lot of these details go into the implementation. No there is no simple "this file is in this filesystem location" sort of doc store implementation because of the missing meta information and versioning support.David H Nebinger2018-05-07T16:32:19ZRE: Store real Excel file on serverBertrand Malethttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1078733442018-05-07T14:08:41Z2018-05-07T14:08:41ZHi,<br /><br />and thanks for your answer.<br /><br />In fact, I'm not trying to get to the file to update them at all. My purpose here is that other systems than the liferay portal need the information into the files. <br />There are already existing scripts that open these excel files, get the content and send it in the correct form to theses other systems.<br />What I would like is to be able to execute these scripts whenever a user uploads a new excel file in the portlet. <br /><br />Is there a native way of automatically serving up the files in a given location for example? If there isn't I'll have to custom code.<br /><br />Regards,<br />BertrandBertrand Malet2018-05-07T14:08:41ZRE: Store real Excel file on serverDavid H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1078676772018-05-07T13:44:23Z2018-05-07T13:44:23Z<div class="quote-title">Bertrand Malet:</div><blockquote>Is there a way of also storing the genuine Excel file?</blockquote><br /><br />The actual excel content is of course still there because the system can serve up the file at any point of time.<br /><br />If you mean you are trying to access the files directly from the filesystem to perform possible changes to the files, well that's kind of the wrong implementation.<br /><br />Instead, you want to look at Liferay-friendly ways to intercept the content to apply changes. It is the only way to be notified of appropriate changes.David H Nebinger2018-05-07T13:44:23ZStore real Excel file on serverBertrand Malethttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1078593902018-05-07T09:05:23Z2018-05-07T09:05:23Z