Just lost almost one hour to follow a ghost error:
Improved my first app with more check on image load (external file reference).. had to write out diagnostic logs to perfectly understand how Aliases are used/expanded and correct use of filenames & aliases mix.
Fow those who might be interested in this self made debugging tool of mine, here's the small trick:
Added size check, filename compose and rename of what the user uploads, and everything worked just fine.
So I copied my functions in another component to achieve the same result, and got that the images load for a while, but as soon as you modify, save the record or close detail view and then reopen it... the image is gone!
After double checking what I did to be sure it wasn't my mistake, another wonder: now you see the picture! Great (but still didn't know why). But if you change it with another image what you get is that after changing the record, saving or reopening the detail view the image will revert to the previous one. Very scarying, expecially because the older was deleted from the computer and was not available at all.
This put me on the rigth path to solve the issue: it must have been related to browser or server caching of the images. Don't being the browser (I cleared the cahe without getting back my newly uploaded image) I stopped and restarted the localserver, and now the image is the one I'm expecting to be.
I'd like to know if anyone else experienced this.. how to avoid it in production and if there is the chance to change cache persistence, or to force don't caching certain files/folders
Improved my first app with more check on image load (external file reference).. had to write out diagnostic logs to perfectly understand how Aliases are used/expanded and correct use of filenames & aliases mix.
Fow those who might be interested in this self made debugging tool of mine, here's the small trick:
Code:
dim fileout as c fileout = filename_decode("[PathAlias.ADB_Path]\diag_log.txt") file.append_line(fileout, now() + " whatever text, data, or session variable here: " + session.imagename)
So I copied my functions in another component to achieve the same result, and got that the images load for a while, but as soon as you modify, save the record or close detail view and then reopen it... the image is gone!
After double checking what I did to be sure it wasn't my mistake, another wonder: now you see the picture! Great (but still didn't know why). But if you change it with another image what you get is that after changing the record, saving or reopening the detail view the image will revert to the previous one. Very scarying, expecially because the older was deleted from the computer and was not available at all.
This put me on the rigth path to solve the issue: it must have been related to browser or server caching of the images. Don't being the browser (I cleared the cahe without getting back my newly uploaded image) I stopped and restarted the localserver, and now the image is the one I'm expecting to be.
I'd like to know if anyone else experienced this.. how to avoid it in production and if there is the chance to change cache persistence, or to force don't caching certain files/folders