Jump to content

Web client file upload into FM Container field...


Tavernier
 Share

This topic is 5679 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

So... I googled around for about an hour. All I found about this topic was a post on these forums for the wishlist, a post that was over a year old.

I'm currently working on a number of PHP scripts which parse through the XML that the FM8 Server Advanced Web Publishing spits out. I can view, edit, create records, and download files that are stored in the database. My PHP runs over Apache on a Linux server, and sends HTTP queries to a Windows machine running FileMaker Server.

Now I'm trying to write a portion of a script that would allow a web user to upload a file with an HTML form to my web server. So far so good... Now I'm trying to store this file in a Container field in my FileMaker database.

The FM documentation doesn't mention anything about this, nor does their online Knowledge Base (just submitted a question there). I'll assume this functionality simply hasn't been implemented.

Now, I'm wondering if there might be a workaround. My idea is this:

- On my Linux server, save the file to some temporary location on a samba share that my Windows FM server will have access to.

- From my PHP script, trigger a FileMaker script on the FM Server to import this file in the right field for a previously created record (whose record id is a known parameter).

In my imagination, the FM server would simply open that file from the network share it's got access to, and that would be it... I could also trigger a script to copy the file directly to the Windows server if network shares cause problems.

What do you think? Am I heading in the right direction?

-Tav

Link to comment
Share on other sites

for the normal parsing: why don't you use fx.php or fm-and-php. All that XML parsing code has already been written.

Uploading: I seem to remember the CWP documentation saying that users's can't upload directly to a container.

Your workaround is exactly as I see it should be done.

Link to comment
Share on other sites

  • Newbies

I've looked at fx.php and it was just much too complicated... my fm xml parsing code fits in 600 lines, including 15+ access methods (ie, getRowCount() etc), and works with php 4 and 5. I like my code lean and mean, no offense to the fx.php developpers...

Thanks for the advice, I'll try to get that FM script working... I'm a bit of a noob when it comes to Filemaker, I'm more coming from an open source background...

cheers :P

Link to comment
Share on other sites

This topic is 5679 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.