links to uploaded files not working on iOS

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
kerelov
Veteran Member
Posts: 45
Joined: 2020-04-17 21:20
Location: Bulgaria

links to uploaded files not working on iOS

Post by kerelov » 2024-12-11 08:59

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.

kerelov
Veteran Member
Posts: 45
Joined: 2020-04-17 21:20
Location: Bulgaria

Re: links to uploaded files not working on iOS

Post by kerelov » 2024-12-11 15:05

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.

Post Reply