Page 1 of 1

links to uploaded files not working on iOS

Posted: 2024-12-11 08:59
by kerelov
Hey guys,
I have a problem after some new releases of Appgini. Now I'm with the latest 24.18 and the problem persists.
I have a filed for uploading documents like PDF, DOCX ect. When uploaded these files could be easily opned from PC.
But when trying to open from iPhone I get Apache error file not found on server. I noticed while on PC the link is for example:

Code: Select all

link.php?t=documents&f=document&i=1845

which leads to

Code: Select all

images/c9520bc0dcd42cdd8.pdf

but on iPhone Safari or Chrome it leads to

Code: Select all

imgaes%5Cc9520bc0dcd42cdd8.pdf
So it seems there is some problem with the / sign or something like that. I didn't have this problem several Appgini releases ago.

Re: links to uploaded files not working on iOS

Posted: 2024-12-11 15:05
by kerelov
I have found temporary solution in changing the $path variable in function getLink in link.php

Code: Select all

$path = str_replace("\\", "/", $path);
The problem for iOS is that the $path variable contains backslashes which for some reason cannot be converted to slashes like on a desktop browser.
I don't know if there is the same issue on Android but i tried 4 different browsers on iOS and the result was the same.
I don't know if this is a bug or some misconfiguration on my side. Now it works fine I hope to find a permanent solution.