
jschudel
Members-
Posts
14 -
Joined
-
Last visited
Everything posted by jschudel
-
Sorry about the dark background. I use dark reader in my browsers, so I didn't check how it looks in the "light" version. The --insecure attribute is something I only figured out after my original post. I did try with BaseElements with BE_Curl_Set_Option ( "CURLOPT_SSL_VERIFYPEER" ; 0 ) which is supposedly the same as "--insecure", but with no success. Obvisouly, HTTP POST vis curl is either super easy in FM (and I am the only one not smart enough to do it) or not used often.
-
When I run curl in the command line like below, I am successful: --header "X-CLIENT-ID: 1000004142" --header "Content-Type: multipart/form-data" --header "Authorization: Basic SHBERGdnaHFOMm9ScmJtQjpmeFERM5mYTczNERyMW9p" -F "elauploadstream=@invoice.xml;type=application/octet-stream" --insecure Where invoice.xml is the local XML file. This works great. Note the "--insecure" at the end, this is required, otherwise I get a certificate error. I am connecting to a local machine. However, I do NOT succeed in FileMaker Pro (19). If I try to use the built-in script step "Insert from URL", I get "Connection failed". Note that I have not found a way to send the curl attribute "--insecure" trough "Insert from URL", it seems to not be supported. Insert from URL URL: httpspost://172.16.10.114:8100/md/ela/uploads cURL: --header "X-CLIENT-ID: 1000004142" --header "Content-Type: multipart/form-data" --header "Authorization: Basic SHBERGdnaHFOMm9ScmJtQjpmeFERM5mYTczNERyMW9p" -F "elauploadstream=@$xmlFile;type=application/octet-stream" If I try using the BaseElements plugin, I am also NOT successful. Using these BaseElements functions below... BE_Curl_Set_Option ( "CURLOPT_SSL_VERIFYPEER" ; 0 ) BE_HTTP_Set_Custom_Header ( "X-CLIENT-ID" ; "1000004142" ) BE_HTTP_Set_Custom_Header ( "Content-Type" ; "multipart/form-data" ) BE_HTTP_Set_Custom_Header ( "Authorization" ; "Basic SHBERGdnaHFOMm9ScmJtQjpmeFERM5mYTczNERyMW9p" ) BE_HTTP_POST ( "https://172.16.10.114:8100/md/ela/uploads" ; "elauploadstream=@$xmlFile&type=application/octet-stream" ) ... I get Error 500 (boundaries not defined). (Note that in FileMaker, I have to save the XML file invoice.xml in a variable, in my case $xmlFile.) Any ideas or help would be greatly appreciated! Thank you!
-
Trying to POST via HTTP to send an XML file to a recipient. Basically, this is the cURL data that I am trying to use: --location --request POST "https://medidatabox:8100/md/ela/uploads" --header "X-CLIENT-ID: 1000004142" --header "Content-Type: multipart/form-data" --header "Authorization: Basic SHBERGdnaHFOMm9ScmJtQjpmeFERM5mYTczNERyMW9p" -F "elauploadstream=@invoice.xml;type=application/octet-stream" I have been trying to use "Insert from URL" and BaseElements "BE_HTTP_SetCustomHeader" and "BE_HTTP_POST", but without success. I am somehow failing to provide the correct info at the correct location (I must assume). "invoice.xml" is an XML file in a container field. I actually put the XML container file into a variable $xmlFile. Client-ID and Authorization are working, as I get a response via GET request. Any ideas on how to get this POST to work successfully either via "Insert from URL" or BaseElements functions? Thank you kindly!
-
I am exporting an XLSX file via Export Field Contents to download the file. On the desktop, this works perfectly, but on WebDirect, the file is empty (no content). The same routine works well with PDF and other files, I just get this strange behavior with the XLSX file export. Any ideas? Thank you.
-
A very strange problem. I added the default Java calendar supplied with FM19 to a solution. While I can assign the fields from the calendar table to the "required options", I cannot assign the fields in "optional fields". When I open the drop-down in the "All day field" and "Editable field", they remain empty. When I open the drop-down in the "Event style field", I only get this selection: Any ideas how to solve this? Thank you.
-
What is the easiest way to read parameters supplied with the URL for WebDirect? The goal is for members to receive an URL per email that already contains their ID and the event ID, so WebDirect knows the member and the event and can automatically load the relevant data. Thank you.
-
Is there any way to export field content from a container field on the server, running as PSOS? Maybe with a free plugin? I was experimenting with BE_ExportFieldContents, but without success. I need to send emails from the server, as the solution runs as WebDirect, and emails may have multiple attachments. I was thinking, instead of adding content to container fields, would it be a viable alternative to store only the links to the files in the DB? Would the server handle that better? Thank you.
-
I am working on an age-old FM-solution, consisting of 60+ files, each file with 1 table, all files linked together. On start-up, the solution opens most of these files and shows some of the respective windows. Now, a client would like to be able to control the behavior (look) of these windows on start-up. In the main "dashboard" file, I am trying to write a script to go to each relevant window (Select Window) and manipulate it (Adjust Window). However, when I run the script, the focus remains on the file the script is running from. After "Select Window", any further "Adjust Window" script steps are applied to the main file the script is running from. How can I change the focus of the script steps to the "Selected Window"? I want to avoid to have to write a script in each of theses 60+ files to manipulate the windows from within these respective files. What I want is to be able to control the behavior of all windows (each based on its own respective file) from within a single script in the main "dashboard" file. Is that possible? Your help is greatly appreciated!
-
SOLVED! I tried to insert the file in a container field in a portal. As it seems, PSOS has an issue with "Insert from URL" into a container field in a portal. PSOS is now using a different layout with a flat hierarchy. I have this strange thing when I insert a PDF from URL ("Insert from URL" script step) while "perform script on server" I get error code 1 ("User canceled action"). This is strange, as I do not consistently get the error. In my case, I am exporting an invoice to PDF (Save records as PDF) to a path, and then convert the path to a URL and insert the PDF from the URL. Please note that in either case, PSOS or local, the sub-scripts go to their respective layouts to read/write data. I trigger this whole process from various locations within the application: 1. when I trigger it from within my Invoices layout, it works well as PSOS and run locally. No errors. 2. When I trigger it from a different layout, it works well when run locally, but when I run it as PSOS, I get error code 1 upon "Insert from URL". I have plenty of error checking and reporting and report all parameters back and just can't find what's going on. Any ideas or suggestions? Thank you.
-
"Insert from URL" to insert PDF on FM Server
jschudel replied to jschudel's topic in Importing & Exporting
@Josh & @comment. Thank you guys! Worked like a charm now that I finally understood that the URL has to have a different format! -
"Insert from URL" to insert PDF on FM Server
jschudel replied to jschudel's topic in Importing & Exporting
Thank you Josh. I already have a path generated where the file gets exported to in "Save Records As PDF", which works perfectly. That path begins with "filemac:/". Like I mentioned, I tried all combinations between "file:", "filemac:" and ":/", "://", and ":///". -
I am running a script on server (perform script on server) which successfully exports data to a PDF on the server ("Save Records As PDF"). Later in the script, I am trying to insert this PDF file into a container, using the "Insert from URL" script step. No matter what I do, I am always getting back errors. FM server is running on a Mac server. I have tried all combinations of different parameters for "Insert from URL", with various formats for the URL (starting with “file”, “filemac”, followed by “:/”, “://”, “:///”). Depending of the combination, I am getting either one of these errors back: 5 - Command is invalid (for example, a Set Field script step does not have a calculation specified) 1630 - URL format is incorrect 1631 - Connection failed Help how to resolve this and successfully insert the PDF into the container field would be appreciated. Thank you.