What's the communication syntax for connecting to the S3 server?
Amazon has lots of options available. There's Java, Groovy, cURL, PHP, but they're pretty confusing to use. I was hoping that I wasn't the first one to attempt this. Looks like there's no code out there yet for our corner of the world.
I stuggled with this one for ages, almost a year, in fact...
Beezwax have a plugin which is supposed to have done this. I had problems with it and NEVER got the support I needed.
I tried other php plugins etc, never got anywhere.
I tried the Java/groovy thing, as jsorge pointed out, it't not easy, I did not get anywhere with these...
Keep in mind, I know nothing about php NOR Java, however, getting any help with these where difficult.
So, what I ended up doing is to get a web developer to design a php script that accepted a Base64 file and it pushed it to the S3 bucket. The php contained all the settings for the bucket, so all I had to do is to post a Base64 file of the image to the php. Note: There is plenty of documentation on Amazon's developer site on how to create the php script.
I can hear you ask: "But, how the heck did you get the Base64 from a container field?" Well, after months of searching and waiting, I was lucky enough to find the BaseElements plugin from goya.com.au - what an awesome tool. Converted the contents of a container field to Base64, then used the same plugin to perform a POST to the web based php script, YAY! "There's a file in my bucket, dear liza"...
So, if you need the php script, I could possibly get a copy, but it belongs to my client, so he may as for a fee. The Base Elements plugin is FREE (they as for 'sponsors', I beleive) The FileMaker side of things is a piece of cake, once you have the plugin.
Let me know how you go... as I said, this took me almost a year to get it happening, so I think this is possibly the quickest and easiest way to do it, I think I could have just saved you a lot of heartache !
Thanks Peter. I had a hunch that I was banging my head against the wall. I found a good open source S3 PHP class at https://github.com/tpyo/amazon-s3-php-class and I'll just use that and put it on our server.
I know this post has 3 years already.... but I am trying to solve a solution to upload files to my S3 with FileMaker and BaseElements plug-in, but still cannot do it. Specially I have a lot of problems calculating the signature.
This is the example I found...
Can you help me ??
It's a bit hard to help you, you haven't give us much information What have you tried, and what is working and what isn't? What results do you get?
What I am trying is to do 2 different things.
First is to upload files using FileMaker with baseelements plugin. Second one, to get the url to download them.
I am trying to understand de documentation API of S3:
Also I tried to develope the signature, as Matt Petrowsky said here:
At the end I ever take the same mistake -> the signature is not correct.
I am losing a project because of this, and the customer will do it with php, instead of FileMaker.
Thanks for all.
Hello, did you see my post ?
That doesn't really help. What have you built in FileMaker? You mean the signature is not correct, what code have you written, what's the response?
To help you we need specifics, actual code from FileMaker and expected result vs actual result.
You may find this thread helpful: Windows Server offsite backups options
A number of people chipped in to the above and, as a result, we now upload daily from Windows servers to S3 using the AWS API launched by Filemaker Server system scripts. S3 browser works well for Windows users for uploading/downloading files manually and for Macs we really like Transmit Panic - Transmit - The ultimate Mac OS X FTP + SFTP + S3 app as, like S3 browser, they both support external buckets that massively simplify our S3 configuration, whereas CyberDuck doesn't. Also for Macs ExpanDrive is also worth a look, but Transmit ticked all the boxes for us.
Has anyone have been able to develop a Filemaker script to upload documents stored on a Container into AWS S3 bucket ?
1 of 1 people found this helpful
Just in case this helps, albeit without the BaseElement plugin and this is for a Windows server only:
The following assumes you have an S3 bucket, user and access keys setup.
Install the AWS CLI from:
https://aws.amazon.com/getting-started/tutorials/backup-to-s3-cli/ (includes setup steps and includes the following link)
https://s3.amazonaws.com/aws-cli/AWSCLI64.msi (links the installer for 64bit server)
Run the AWSCLI64 installer
Launch the command line run as administrator
Paste the Access Key ID for the S3 user
Paste the Secret Access Key for the S3 user
Default region name:
(e.g. Ireland in normal text format, not eu-west1, which is required in the batch file below)
Save a batch file using Notepad (.bat - not as a text file) in Programs\FileMaker Server\Data\Scripts\ folder containing:
set AWS_ACCESS_KEY_ID=YourAccessKey set AWS_SECRET_ACCESS_KEY=YourSecretAccessKey set AWS_DEFAULT_REGION=(InTheForm)eu-west1(for Ireland as an example) aws s3 sync C:\Your\Windows\Location\Of\Your\Files s3://S3BucketName/SubFolder/Path/ --delete
Only use the --delete if wanting to synchronise the contents of both folders
Use a FileMaker Server system script schedule to run this, you may need to enter the server administrator name to run the system script, if you wish to have it run routinely. Otherwise you can just double click the batch file and the command line will display any errors or the file copying status.