attaching document images to a filepro file
Fairlight
fairlite at fairlite.com
Tue May 1 13:34:07 PDT 2018
In no way do you want to try to store the actual files inside filePro, even
if you have BLOB capabilities. BLOBs were never stable enough for that,
from every indication I've ever heard.
Obtain the pathname, and store the path to the image in the filePro record.
Beware of path lengths. It's probably not even going to be an issue, as
filePro's max field length for a real field is 999 characters. MAXPATHLEN
in *nix used to be 256, so it wasn't an issue back in the day. However,
it's been bumped up quite a bit in 25 years. This is from the 4.16 kernel:
/usr/include/linux/limits.h:#define PATH_MAX 4096 /* # chars in a path name including nul */
/usr/include/sys/param.h:# define MAXPATHLEN PATH_MAX
In theory, you could have a long enough path length that filePro falls 3x+
short of being able to handle it in a real field.
In practise, this will depend entirely upon your filesystem heirarchy
depth, and directory and file naming practises. It may not even be an
issue. It's something of which you need to be aware, though, and plan
accordingly.
Your alternative to storing the path directly is to use an intermediate
file of some sort. You'd need a unique identifier like an SHA1 or MD5
hash of either some data in the record guaranteed to be unique, or of the
image file itself (more expensive to calculate on larger files) for some
identifying linkage, use something like a GDBM hash file on disk, and write
a tiny front-end (I'd use Perl) as a front-end to -that- file. Then you
could store the guaranteed-small hash in filePro, and look up the actual
path using the hash as the key, and retrieve the full path into a largely
cast (or uncast dynamic) variable in filePro.
mark->
On Tue, May 01, 2018 at 08:18:43PM +0000, Ron Fischer via Filepro-list thus spoke:
> Hi
>
> Don't usually post but do read all your posts every day.
>
> I was wondering if I can attach a document (PDF) or (JPG) file to a record in a filepro file.
>
> ie; a PDF invoice to an invoice record for viewing in filepro.
>
> Thank you all for all the past postings, and thank you in advance for any help provided.
>
> Regards
>
> Roland Fischer
> Data Processing Mgr
> EPC Associates, Inc.
> Ronkonkoma, NY
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20180501/dd2c78ea/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
--
Audio panton, cogito singularis.
More information about the Filepro-list
mailing list