Closed ianchb closed 1 year ago
Hi, I face the same issue.
I get this message in the HTML code (div class FofUpload-TextPreviewError) :
Error previewing file. It may have been deleted, or the provided file ID is invalid.
It might not be related however since this div is not visible...
Here's an example : https://ufr-forum.crachecode.net/d/2062897-test-transfets-de-fichiers/12
The JavaScript still retrieves the link to the file : https://ufr-forum.crachecode.net/assets/files/2023-02-22/1677049996-661418-code.txt
This forum is a bit modified version of flarum but I have the same issue with a brand new one, using crazymax/flarum:latest
flarum v 1.6.2 fof/upload v 1.2.3 (in both cases)
Any help would be much appreciated !
ok I've got it ! (at least in my case)
The whole topic content is inside a noscript tag :
<noscript id="flarum-content">
thus the inline <script>
written just after the uploaded text preview won't be executed !
I guess it's a security method. I wonder how we could fix that not putting the website users at risk.
Text files cannot be previewed correctly
I‘ve just updated the extension and tried to use the text preview template.![image](https://user-images.githubusercontent.com/45872450/151180026-f6e828f6-36e1-43fa-ada2-81fbd37c9296.png)