Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Upload a file throw a form ?

Quote Reply
Upload a file throw a form ?
Hi,

I created a form that uses gforum.cgi to pass the variables to another page. Now I need to add in this form a option to upload a file on the server. How can I do this?

Thank you.

François
Quote Reply
Re: [Franco] Upload a file throw a form ? In reply to
You need to add a "file" field to your form. You then need to use multipart/form-data encoding type and then upload the file somewhere in the code. I think you can add hidden parameters to your form like:

<input type="do" name="upload_stuff">

...then if you create a new action called "upload_stuff" you can link it to a perl module containing your code.