Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Images management
Message
From
09/01/2023 18:17:32
 
 
To
09/01/2023 11:03:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01685745
Message ID:
01685751
Views:
46
Likes (1)
>For inventory management purposes I have to add images.
>1. Only keep path and file in a character field

I agree with Lutz - store the path and file name.

A few cautions from my own experiences:

We have a system with many images.
The root folder for the image files is a configuration item - you may need to move to a different disk / share / etc.

Windows will choke with hundreds of thousands of files in one folder.
So the system creates folders for year, month, day as it stores images.
Depending on your estimated number of pictures, just a folder for each year might be enough, or year and subfolders for each month.

One other very common issue is sharing files across the network.
We have web processes, windows UI programs, and scheduled batch programs that need to work with images.

Previously, when our web program received image files, it would reach across the network and create the folders as needed and MOVE or CREATE the image files there.

That worked fine, until a network admin changed all the passwords and our web program no longer had rights to create files across the network.
Oops.
Worse yet, C# File.Move() would lose the original file if it could not write to the destination folder.
Double Oops!

We changed to creating image files in a local temp folder, each with a second text file containing the desired ultimate path.
Inventory08845-45.jpg
Inventory08845-45.txt

After we were through creating files, we ATTEMPTED to COPY all files in the temp folder to the destination, then validated the copy existed and had the same file size.
After the copy was confirmed, then we deleted the files from the temp folder.
That way, if we get a permission or other network problem, we will just Copy/Confirm/Delete temp file next time.
No issues so far.

Good Luck!
Previous
Reply
Map
View

Click here to load this message in the networking platform