I managed to upgrade OJS version 3.1 to 3.2.1.4 using PHP 7.2 but I noticed that galley not loaded but can be downloaded successfully.
this is the sreenshoot of the error :
PDF.js v2.5.207 (build: 0974d6052)
Message: _pdfjsLib.URL is not a constructor
browser inspect
app.js:1654 Uncaught (in promise) TypeError: _pdfjsLib.URL is not a constructor
at validateFileURL (app.js:1654)
at webViewerInitialized (app.js:1676)