Not sure how the "store by reference" option affects system performance here. If you are dealing with the photos one on one, the data in the image file has to be piped from the server to the client machine either way so I don't really know how much difference it makes. Maybe another forum member has experimented with this and can post their experiences here.
I do know that you can insert a picture into a container field and then use just a FileMaker script to both export it to a new location such as your folder on your server and you can then re-insert the picture by reference from this new location. You can't create new folders if that's an issue, but the rest doesn't require a plug in to do.
Its like hitting the jackpot when you answer (there are alot of jackpot winners out there) (now if I can get Mr. Vodka and Super Ninja to reply, it would be a tri-fecta)
So I would click my webcam button to take a picture, then insert picture (not as ref.), then export field contents (to my networked drive), then insert picture again (as ref.)
The only problem is I want to rename the picture to the fields lastname & firstname & ".jpg" and I don't see how to do that. When I specify output file, it wants the name of a current file,
not firstname & lastname.jpg and then again the same problem with inserting that renamed picture.
Any more thoughts
Export Field Contents permits you to name the file and specify the location. This doesn't move the file from its current position, but rather copies it to the new one.
You can use set Variable to compute filepath and name and then use the variable to specify the location and file name to which you want to export the image.
I didn't know you could put a variable name in place of a real filename in the file path, very nice, the export field contents & insert picture work great.
1 problem left, if I can't move or delete the original picture file (w/o using a delete file plugin), then the next time I take a picture it will be called picture 3, then picture 4 and so on,
so my 1st insert picture wont be able to find the picture I just took. I will also be taking pictures from 2 different computers, so some sort of counter wouldn't work unless I could tell which computer I am currently taking the picture from (or I could save the pictures taken from any computer to the same shared network folder, but I don't think you can make a counter to keep track of what photo you are currently on for different users on differnet computers to see) (or, another thought just hit me, let the picture filenames keep progressing (picture 2, picture 3...), then in my script, make a loop trying to open picture 2, then picture 3 and so on, when it returns an error, then I know to reopen the previous picture and wa-laa, problem solved??) Or is there another way?
my script so far: (after taking the picture)
set variable ($name;value:contacts::lastname & contacts::namefirst $ ".jpg")
go to field (contacts::pic1)
insert picture ("Picture 2.jpg)
export field contents (contact:pic1;$name)
That last thought worked, but instead of using the Open File command, I used the Insert Picture command.
but of course, 1 problem left (but its with logitech), just when I thought each filename would be 1 higher, sometimes it seems to jump (so now I have a gap between numbers), I think depending on if I switch users.
Here's a possible way to use your counter to compute the file name:
We have a situation here where we have multiple cashiers each with their own computer and printer printing out NCR invoices with preprinted invoice numbers. Each time a cashier prints an invoice the script has to assign the correct invoice number to the invoice. I thus keep a table of printer counter records and each computer is assinged a unique user name in preferences.
My script then uses get ( UserName ) to figure out which counter record to increment and then which value to assign as an invoice number.
I think the same basic method could be used to access the next picture you take so that you don't have to use Insert Picture with a dialog to find and insert the next new picture. (You can use Insert File with a computed filepath variable instead.)