May 30, 20205 yr I store documents (pdf, jpg,...) in a container field, externally and open, I see all of the container files under a RC_Data_FMS folder. I would like to be able to email one of these documents enclosed in the message using the Send mail script step, so I need to use the external file path of the container object. I've tried this locally and it works but I can't get it working in the hosted file. The path I use in the hosted file is: file:RC_Data_FMS/.../containerFieldName/file.pdf The hosted file that has to run the script is in the same level as the RC_Data_FMS folder, so all seems correct
May 30, 20205 yr You're not supposed to touch or be able to read from that path directly; the RC data files are live FM files just like the actual FM file. Only FMS itself should have access to it. The way to email a file is to first export it out fo the container, to say the user's doc folder or temp folder and use that path for the Send Mail script step.
May 31, 20205 yr In which probably is good if each user intends to store that file, however if the user have no ambition to pull the file from the database before sending reduces available bandwidth. Is there a way to send from server?
May 31, 20205 yr Let me put it bluntly: if the user does not want to interact with the container data through FileMaker then don't use FileMaker. The Remote Container feature is a strictly internal FMS feature to make its management of that data easier and achieve backup and storage efficiencies. It is NOT meant to expose that data to anything outside of FM. And if you use those files directly without going through FM then you are risking corruption to the solution. If bandwidth is a big issue then don't store that data in FM to begin with, but use a service that does file management and that has an API (dropbox, box.com, OneDrive, Google Drive, OwnCloud, NextCloud,... the list long). FM is excellent at integrating with APIs.
May 31, 20205 yr Author Actually I've found this which explains it all: https://help.claris.com/en/pro-help/#page/FMP_Help%2Fpaths-in-server-side-scripts.html%23 So the only way to send the files hosted by FMS is exporting them into a user folder.
May 31, 20205 yr “the only way” When using FM’s native Send Mail script step: yes. when using some email provider API or file sharing API: no, then you have more options.
May 31, 20205 yr 8 hours ago, Wim Decorte said: If the user does not want to interact with the container data through FileMaker then don't use FileMaker. I did expect a PSOS answer here. Edited May 31, 20205 yr by ggt667
May 31, 20205 yr Why? PSoS doesn't make no difference in the basic principle of not touching the RC files. PSoS uses the FMS scripting engine process, whereas it is the db engine process that maintains control over all the data files (FM files + RC files). So as far as the db engine process is concerned, the FMS scripting engine is just as foreign as anything from the outside. The pure and basic principle is: interact with container data ONLY through a FM container field, do not try to read directly from the hard drive. Edited May 31, 20205 yr by Wim Decorte
Create an account or sign in to comment