We have reset all users FileMaker related profile fields. Please take the opportunity to update your information,  this will provide background to members whom read your posts. Click here.

Jump to content

357manch

Newbies
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About 357manch

  • Rank
    newbie

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

286 profile views
  1. With the introduction of cURL options in FM16's Insert from URL script step I've been investigating the possibility of being able to save a copy of my FM solution directly to my Dropbox folder using the https://content.dropboxapi.com/2/files/upload element from Dropbox V2 API. I've successfully created the access token to pass through as part of this step and the Insert from URL script step successfully creates the stated folder and file in my Dropbox. However, the file size is always 0 bytes. I've tried 2 different methods METHOD 1 #Export a compacted copy of this file to Temporary Folder Set Variable [ $file_path ; Get ( TemporaryPath ) & "Solution.fmp12" ] Save a Copy as [ "$file_path" ; compacted ] #Set my cURL options to variable Set Variable [ $curl_header ; "curl -X POST https://content.dropboxapi.com/2/files/upload \\" & ¶ & "--header \"Authorization: Bearer " & PREFERENCES::Dropbox_AccessToken & "\" \\" & ¶ & "--header \"Dropbox-API-Arg: {\\\"path\\\": \\\"/DB2FM/Solution.fmp12\\\"}\" \\" & ¶ & "--header \"Content-Type: application/octet-stream\" \\" & ¶ & "--data-binary @" & $file_path ] #Dropbox URL Set Variable [ $dropbox_url ; "https://content.dropboxapi.com/2/files/upload" ] #Make Request - Set to variable adn then format to JSON field Insert from URL [ Verify SSL Certificates ; With dialog: Off ; $json ; $dropbox_url ; cURL options: $curl_header ] Set Field [ PREFERENCES:Dropbox_JSON ; JSONFormatElements ( $json ) ] METHOD 2 #Export a compacted copy of this file to Temporary Folder and then import to a container field Set Variable [ $file_path ; Get ( TemporaryPath ) & "Solution.fmp12" ] //note1 Save a Copy as [ "$file_path" ; compacted ] //note1 Insert File [ PREFERENCES::Container ; "$file_path" ] //note1 #Set variable following instructions on FileMaker website which states: # - Direct file access is replaced with a FileMaker variable prefixed by the @ character. # - To access a file, you can set the variable to a container field, which contains the file, then use that variable as the parameter of the cURL option. Set Variable [ $container_path ; PREFERENCES::Container ] #Set my cURL options to variable Set Variable [ $curl_header ; "curl -X POST https://content.dropboxapi.com/2/files/upload \\" & ¶ & "--header \"Authorization: Bearer " & PREFERENCES::Dropbox_AccessToken & "\" \\" & ¶ & "--header \"Dropbox-API-Arg: {\\\"path\\\": \\\"/DB2FM/Solution.fmp12\\\"}\" \\" & ¶ & "--header \"Content-Type: application/octet-stream\" \\" & ¶ & "--data-binary @" & $container_path ] #Dropbox URL Set Variable [ $dropbox_url ; "https://content.dropboxapi.com/2/files/upload" ] #Make Request - Set to variable adn then format to JSON field Insert from URL [ Verify SSL Certificates ; With dialog: Off ; $json ; $dropbox_url ; cURL options: $curl_header ] Set Field [ PREFERENCES:Dropbox_JSON ; JSONFormatElements ( $json ) ] JSON Response For Both Methods I get the following JSON Response for both methods { "client_modified" : "2017-05-16T11:22:47Z", "content_hash" : "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "id" : "id:heJWQ1SWwJsAAAAAAcMWNw", "name" : "Solution.fmp12", "path_display" : "/DB2FM/Solution.fmp12", "path_lower" : "/db2fm/solution.fmp12", "rev" : "3a0412f00f58892", "server_modified" : "2017-05-16T11:22:48Z", "size" : 0 } Any ideas as to why the file is created but with no content. I've also tried this with a number of different file types (.png, .txt, .pdf) by manually inserting a file into the container and greying out the 3 steps marked //note1 above but the result is always the same.
  2. Why is Sync Speed So Slow?

    Hi I tested the EasySync demo files on my FM Server and iPad and the time taken to download the 106 pre-installed records is a mere 10 seconds which is great. I then moved on to a full integration into my FM solution, a Patient Management System for Aesthetic Clinics. There are 60 tables ranging in size from 10 fields up to 874 fields although the majority fall below 150 fields per table. Approx 50 tables require sync capability. Once I had completed the EasySync integration I set the sync into motion having added a single Patient record in my Patient table. The sync took a staggering 33 minutes. To try and identify why the sync was taking so long I deleted the ES_ table occurrences for all but 5 of my tables in both the hosted and mobile solutions. The subsequent sync time, again with a single new record came down to just over 2 mintues. My final test was to remove the ES_ table occurrences for all but my Patient table. The same test as above reduced the sync time to 18 seconds for a single record. Does this behaviour sound familiar to anyone else, and if so, is there a way of addressing it? EasySync looks like the answer to all of my sync problems, but if each sync is going to take upwards of half an hour once the full integration is restored, unfortunately it isn't going to be a workable solution. Thanks in advance for your help, Neil
×

Important Information

By using this site, you agree to our Guidelines.