[FX.php List] Handling File Uploads

Malcolm Fitzgerald malcolm at notyourhomework.net
Fri Feb 8 03:51:10 MST 2013


Terrific. I'll dig in and have a look.

thanks 

Malcolm


On 08/02/2013, at 7:10 PM, Steve Winter wrote:

> Hi Malcolm
> 
> All the advice and guidance you've received has contained excellent solutions, and comment, however much of it is, in my mind, now outdated by the arrival of FM12, external containers and the Insert From URL script step.
> 
> In the past you didn't want to insert files into FM because it bloated the DB
> In the past you could upload files to a folder on the network and someone could manually import a reference into a container
> In the past uploading to another folder on the server and using a web viewer was a great solution (I did a demo at DevCon 2010 of a drag-and-drop solution which worked from both the web, and a web viewer in FM, to use the same functionality for uploading and accessing files on both the web and FM)
> Currently, you can't 'monkey around' with the FileStructure which FM creates for external files directly
> 
> BUT you can most certainly provide a very smooth user experience from the web which gets files directly into container fields so that they can be viewed in their containers in FM. The process goes like this;
> 
> build PHP page which uploads file to web server
> call script on FMS using PHP which creates new record and imports file into container
> 
> That's it…! Attached is a very simple demo of this which I used at a recent TechNet session here in the UK. It uses the API rather than FX, but translating the code is trivial… to see it work, upload the DB to your FMS, drop the PHP file and the folder into your web root, give Apache/IIS write permissions on the folder, browse to the PHP file, enjoy the majesty…!
> 
> Clearly adding a jQuery (or other framework as desired) drag and drop uploader to the 'front' in place of a standard form upload would be quite a simple task to undertake… If you're still in pre FM12 land an interested in the drag and drop solution for that (aspects of which Mr Patin as previously implemented to good effect with clients) then drop me a line...
> 
> Cheers
> Steve
> 
> 
> 
> <Archive.zip>
> 
>> That's right. The security model applies to container fields. The data may be stored outside the database but it is still subject to the security model. That prohibits us from modifying these files at will. 
>> 
>> Malcolm
>> 
>> 
>> On 08/02/2013, at 4:07 PM, Head Honcho wrote:
>> 
>>> It is not recommended to touch/use FileMaker's externally stored files.  If you fiddle with them, FileMaker complains and says they've been modified (by an external user).
>>> 
>>> Certainly keeps the bloat of the solution down, but isn't as helpful as first thought
>>> 
>>> Regards
>>> 
>>> Michael Ward
>>> --
>>> Head Honcho, CustoMike Solutions
>>> Member, FileMaker Business Alliance & FileMaker Technical Network
>>> FileMaker 7, 8, 9, 10 & 11 Certified Developer
>>> ph 0414 562 501
>>> headhoncho at customikesolutions.com
>>> 
>>> On 08/02/2013, at 11:29 AM, Bob Patin <bob at patin.com> wrote:
>>> 
>>>> I don't ever upload into container fields, because they just bloat the database. Instead, I upload to directories on the clients' sites, and link to them using a field in the database.
>>>> 
>>>> Now, with FileMaker storing files separately from the database, I may need to rethink my strategy, but with a web app, it basically amounts to the same thing, except that in FM 12 the relationship between attached files and the database is handled by the database itself rather than by using a stored link to an upload.
>>>> 
>>>> Bob Patin
>>>> Longterm Solutions LLC
>>>> P.O. Box 3408
>>>> Brentwood, TN 37024
>>>> bob at longtermsolutions.com
>>>> 615-333-6858
>>>> http://www.longtermsolutions.com
>>>> iChat: bobpatin
>>>> AIM: longterm1954
>>>> Twitter: bobpatin
>>>> Google+: http://www.longtermsolutions.com/plus
>>>> --
>>>> FileMaker 9, 10 & 11 Certified Developer
>>>> Member of FileMaker Business Alliance and FileMaker TechNet
>>>> --
>>>> FileMaker hosting and consulting for all versions of FileMaker
>>>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>>> On Feb 7, 2013, at 6:16 PM, Malcolm Fitzgerald <malcolm at notyourhomework.net> wrote:
>>>> 
>>>>> I wondering how other people have handled file uploads to FMPro databases. I've read the docs and they say that web users only get read privileges on container fields. That doesn't prevent us from accepting file uploads in the browser and putting them somewhere so that they can be accessed later on. 
>>>> 
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> FX.php_List at mail.iviking.org
>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>> 
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>> 
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> Steve Winter
> +44 777 852 4776
> steve at bluecrocodile.co.nz
> 
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20130208/9c8d0728/attachment.html


More information about the FX.php_List mailing list