Skip to main content

How to integrate FileMaker with Cloudinary?

Comments

10 comments

  • Tom Langton

    Solves the issue of uploading from FM very nicely.

     

    Thanks.

    0
  • Svenja Weschke

    how can I integrate following options to the cURL functions:

    crop c_limit

    progessive fl_progrssive

    and different sizes to which the image should be resized

    for example: w_2560,h_1600 and w_1920,h_1080

     

    if I add this to the url it does not work

    Thanks for any help

    0
  • Roee Ben Ari

    Hi Svenja, can you please try editing your script as per the below - 

    Set Variable [ $transformation; Value:"w_2560,h_1600,c_limit,fl_progressive" ]
    
    Set Variable [ $data; Value:"file=" & $file_to_upload & "&public_id=" & $public_id & "&timestamp=" & $timestamp & "&api_key=" & $api_key & "&signature=" & $signature & "&transformation=" & $transformation]

     


    0
  • Kevin Mead

    Is there a way to specify what folder to upload to in Cloudinary.  From the filemaker script?

    0
  • Aleksandar Kostadinov

    Hi Kevin,

    The folder(s) are part of the public_ids by default, therefore, you can set the folder or sub-folders as part of your $public_id value. E.g. You can set the public_id to be "folder1/folder2/image" and it'll result in the image being stored under the two folders specified.

    Alternatively, you can add a new parameter in the upload called 'folder'.

    Set Variable [ $folder; Value:"example_folder" ]

    If you decided to use the public_id approach and add the folder as part of that variable then you don't need to update another part of the code.

    On the other hand, if you decided to supply a 'folder' parameter then you will also need to add it to the line (39 in the above example) that generates the authentication signature. In addition, you would also add it to the $data variable in the post's example (line 40). Please note that the parameters passed for signing need to be ordered alphabetically, therefore, in the above example, the folder would be the first parameter. 

    Please try this and let us know how it goes.

    0
  • printerdirect

    hello please can you provide the code to DELETE a particular image, from Filemaker 

     

    Thank you!

    0
  • Loic Verger Del Bove

    Hi,

    You will need to change the `$server` variable to actually point to the destroy endpoint:

    Set Variable [ $server; Value:"https://api.cloudinary.com/v1_1/" & $cloud_name & "/image/destroy" ]

    Then remove the `file_to_upload` parameter from the `$data` variable as we only need the `public_id` as mentioned in the endpoint documentation:

    Set Variable [ $data; Value:"public_id=" & $public_id & "&timestamp=" & $timestamp & "&api_key=" & $api_key & "&signature=" & $signature ]

    So the payload, starting L35, should look like this:

    Set Variable [ $server; Value:"https://api.cloudinary.com/v1_1/" & $cloud_name & "/image/destroy" ]
    Set Variable [ $public_id; Value:"my_public_id" ]
    Set Variable [ $signature; Value:HexEncode ( CryptDigest ( "public_id=" & $public_id & "&timestamp=" & $timestamp & $api_secret ; "SHA1" ) ) ]
    Set Variable [ $data; Value:"public_id=" & $public_id & "&timestamp=" & $timestamp & "&api_key=" & $api_key & "&signature=" & $signature ]
    Set Variable [ $options; Value:"-d " & "\"" & $data & "\"" ]

    Please have a look and let us know how it goes.

    0
  • Svenja Weschke

    we are running the filemaker image upload function very well since years, how is it possible to upload an vtt file?

    Thanks a lot for any help!

    0
  • Tia Esguerra

    Hi Svenja, 

    Thanks so much for reaching out. 

    We do support uploading vtt files. These would fall under the umbrella of a raw file type. So you will need to either upload as ``` resource_type: 'raw' ``` or ``` resource_type: 'auto' ```, which will let Cloudinary determine the type of file being uploaded. 
    I will link to our documentation on the 'auto' resource type for your reference:https://cloudinary.com/documentation/upload_images#the_39_auto_39_resource_type 

    I'm not familiar with filemaker, but I think the line from the code above that you will need to change is line 35. instead of 

    Set Variable [ $server; Value:"https://api.cloudinary.com/v1_1/" & $cloud_name & "/image/upload" ]

    you will want to use:

    Set Variable [ $server; Value:"https://api.cloudinary.com/v1_1/" & $cloud_name & "/raw/upload" ]

    I hope this helps. Let me know if you have any questions.

    Kind Regards, 

    Tia

    0
  • Svenja Weschke

    Hi Tia,

    thanks a lot, it works as long as the code snippet in line 36 is changed from

    data:image/jpeg;base64
    to
    data:text/vtt;base64
     
    All the best,
    Christoph
    0

Please sign in to leave a comment.