virgonova Posted September 14, 2005 Posted September 14, 2005 I know this topic has been discussed many times, I’ve searched threads but cannot find - can someone please send me a link? I moved a FM database to another server, many of the images are stored as reference only, I need to redirect the file path to the new server and store the actual file (I may need to move the database in the future) Sorry for the redundancy, thanks in advance....
Fenton Posted September 14, 2005 Posted September 14, 2005 There's more than one way to guarantee access to the files. One way is to completely embed the files into the container fields. The other is to calculate a path to the files, with a construction that allows you change the volume name (Mac) or path. There is a special syntax for referencing a file (or image) from a FileMaker calculation field (with the result Container). It's slightly different for each platform. On a Mac, for a file, it's: "filemac:/" & complete file path which could also be calculated as: "filemac:/" & volume name & "/" & rest of the path In the first case, completely embedding the files, you would have to bring them in again. You could either use Import Folder, or Insert, with the help of AppleScript, or a plug-in, such as Troi File to manipulate the files. But in any case you would have to know the path, so that you could match to your FileMaker records. Otherwise how would it know which picture goes with which record? In the 2nd case, the calculated path, you'd also need to know the path. But you wouldn't have to import again. Fortunately the file path is still in the container field which you inserted into. You can see it with a calculation (result Text): GetAsText ( Container field) The full path is on the last line, which you can get with: Substitute(MiddleValues(GetAsText(ImageRef); 3; 1); "¶"; "" ) Whether you embed or reference via calculation depends on several factors, and is partly just a matter of choice. Embedding certainly has advantages as far as portability (though a calculation can also compensate for this). It also no longer requires a separate machine as an image server. But I would not embed many large files in one of my main database files, for size considerations if nothing else. I'd put them into another related file. Embedding's disadvantage is that it's a bit more difficult to access and work with the files afterwords. You can't just go open one as a normal file in the Finder. You have to Export Field Contents, work on the file, then Insert as File again. Takes a little discipline of the part of users.
Recommended Posts
This topic is 7108 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now