Skip to content

Commit ebe2248

Browse files
committed
Open files without editor
If the file manager is implemented without an editor and does not open a new popup window (ie. just using as a file browser/upload/download app), open files using browser's default method instead of trying to access window.opener (which does not exist).
1 parent e6a0d5f commit ebe2248

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

public/js/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ function useFile(file_url) {
320320
window.close();
321321
}
322322
} else {
323-
// No WYSIWYG editor found, use custom method.
324-
window.opener.SetUrl(url, file_path);
323+
// No editor found, open/download file using browser's default method
324+
window.open(url);
325325
}
326326
}
327327
//end useFile

0 commit comments

Comments
 (0)