12
I need to have a unique identifier to a file on disk, without posibility to store anything in the database. It needs to be in a format that can be transported using webhandler.
if the full path is something like this:
\\myserver\myshare\332\2020\sometekst233-22332-2112.pdf
is it possible to use a encode hash or base64 to send to webhandler, and then do a decode back to normal?
The customer will send the encoding back to me and I will send the correct pdf file from disk...
It seems like base64 gives me this:
"XFxteXNlcnZlclxteXNoYXJlXDMzMlwyMDIwXHNvbWV0ZWtzdDIzMy0yMjMzMi0yMTEyLnBkZg=="
so that would probably be an ok format...
By using bash64 in fullname seems to work swell, an the chance to get the same base64 resolution for different full names are probably small,I hope :-) but by adding the digest to the base64 string and check it when getting the file would be even better...
3. feb. 2020 kl. 15:57 skrev Peter Judge <bounce-pjudge@community.progress.com>:
<ProgressEmailLogo-png_2D00_150x42x2-png>Update from Progress Community
Peter Judge It's easy enough to calculate a digest (look at the MESSAGE-DIGEST function) but finding the file from that hash will be harder, since digests are one-way (ie you will need to read all the files in the directory until you find the one with a matching digest).You could mitigate this by using a TT to store the digests and their file names, but- you have to do it in each session- the cache of digests will get stale, probably quite quickly: new files, deleted files, renamed files will all affect that cache.You will also need to think about which directory to look in … it looks like there's some structore already "332" and "2020" .You received this notification because you subscribed to the forum. To unsubscribe from only this thread, go here.
Flag this post as spam/abuse.