FormsToGo can build this for you, although you want to spend a fair
amount of time reading about the very many scary server attacks which
can be easily mounted through an insecure file upload facility.
You can lay out the form in Freeway, no trouble. Make the following
two changes to your form:
In the Form Setup dialog, click on the Extended control, then New,
then add this Name/Value pair in the sub-sub-dialog:
- Name: enctype
- Value: multipart/form-data
Then draw a text input where you want your file select control to
appear, and while it is selected, choose Item/Extended from the main
menu. Click new, then add:
Be sure to name this new “file” control exactly the way that FormsToGo
recommends in their manual. The PHP standard is to call it ‘userfile’,
and you set that on the Output tab of the Inspector in the Name field.
(The Title field, in the left-most tab of the Inspector, does not set
the actual form element name, except if you’re lucky.)
Finally, you’re going to need an FTP or SFTP application to access
your server, and you’ll need to read up on setting file permissions on
the folder that will be receiving the files. You will want to have
this file outside of the server’s Web root, as this is how an XSS
attack is usually mounted: malicious person uploads a script,
cunningly named fluffyBunny.jpg, into a folder, then requests that
file with a carefully-written URL later on. If you want people to be
able to upload files and then see them on Web pages, you need to be
sure to run those files through a server-side process, like maybe an
image resizing script, which will certainly root out any non-image
files. So the final workflow would be: 1. Customer uploads file, 2.
Server stores the full-size file somewhere outside of the publicly-
visible Web root. 3. Server resizes the image to make a thumbnail to
show for confirmation, and moves that copy into the public folder, and
4. Client downloads the full-size file for printing.
Oh, and by default, most hosts are set up to only accept a 2MB or
smaller upload, so you’ll need to change that on your server using the
control panel.
File uploads are a lot of work to do correctly.
Walter
On Oct 6, 2010, at 9:12 AM, Kevin McElligott wrote:
Hi
I have had a request to put a facility on a website to upload
pictures by by the person browsing the site. This is so my client
can then produce prints from the files.
Can anyone tell me how to achieve this?
Thanks in anticipation -
Kevin
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options