Bypass for flipbook files in VIEW of OA file (Solved)

Hi all,

EDIT: Solved :slight_smile:

I have another question, which is far away offtopic from classical topics :slight_smile: But maybe it should be a tricky challenge for someone.

We want to use classical inline HTML viewer, which is secure, for showing flipbooks, which are basicly HTML too. The tricky part are dependent files. Flipbook has too many dependent file and too complicated structure so its imposible to use classic method for uploading them into files folder one by one.

At this moment I can upload a zip file marked as flipbook into monograph folder. I can classicly handle the ZIP file and then extract them and create the folder with flipbook files. No problem to this moment. I can delete file with folder, edit it and i can show through catalog/view method the index.html file in folder without downloading the whole ZIP file. And now the tricky part :smiley: The index.html code looks like this:

<link rel="image_src" href="files/shot.png">
<link rel="shortcut icon" href="files/thumb/1.jpg" />
<link rel="apple-touch-icon" href="files/thumb/1.jpg" />
<meta name="og:image" content="files/shot.png">
<meta property="og:image" content="files/shot.png">
<title>České země od příchodu Slovanů po Velkou Moravu I.</title>
<link rel="stylesheet" href="mobile/style/style.css" />
<link rel="stylesheet" href="mobile/style/player.css" />
<link rel="stylesheet" href="mobile/style/phoneTemplate.css" />

<script src="mobile/javascript/jquery-1.9.1.min.js"></script>

<script src="mobile/javascript/config.js"></script>



</head>	
<body>
	<script src="mobile/javascript/search_config.js"></script><script src="mobile/javascript/bookmark_config.js"></script>
<script src="mobile/javascript/LoadingJS.js"></script>

<script src="mobile/javascript/main.js"></script>

<link rel="stylesheet" href="mobile/style/template.css" />
<script type="text/javascript">

		
	var sendvisitinfo = function(type,page){};
	
</script>

<script></script>
<noscript><div><hr/><ul><li><a href="files/basic-html/index.html">Pages</a></li></ul><hr width="80%"/></div></noscript>

I can see it in iframe view, but i don’t know how to handle dependent files to show whole flipbook. I’ve found that I need to change something in CatalogBookHandler.inc.php download method cause files have url catalog/download but I stuck here. Because files doesn’t have template names and are not in database. I can’t handle them classicly, but we still want to secure them with this viewer.

Is it possible to create some kind of bypass to use the main folder as reference for files?
The file adresses are like catalog/download/1020/3160/mobile/style/template.css now.
Folder has classic format and I can access it cause I see the index.html file in it: monographs/1020/submission/proof/1020-32-830-1-10-20181206/

We are using OMP 3.1.0 for now.

Thank everyone for every kind of help with this tricky challenge :slight_smile:
Best regards,
Radek