The Main Panel work like the Macromedia Standard Server Behavior.
Value to send
This is the list of form field.
All the value of the selected field will be passed to the redirect page with the get method.
Upload panel
It is possible build form pages that include file upload fields that are not required.
The user can submit the form filling in all the other fields and leaving the file upload empty.
Upload report
The redirect page receive, in the post, this field for each file uploaded:
-
StatusField-
NameField-
ErrorFieldTo separate the single file value (for multiple upload file) to each variable I add the name of the form field with an _ (underscore) like for example
StatusField_file1 The StatusFields values are: saved / error / skip
The ErrorField values can be (depend on the reason the file is not saved):
size / extension / image dimension / skip for exists / cannot move file If the total file size exceed the limit the page return back and a javascript alert is send to the user
To see an example of the redirect page click this link
Files List
The list of the File Field in Your form.
No Limit Number of Uploaded file!
Click on the file name to see/modify/insert the features applied to it.
Script TimeOut
The Server.ScriptTimeout of Your PHP page.
Progress Bar
You can select the Progress Bar to display during the Upload
See the different type of Progress Bar Available.The Progress Bar page are simple PHP page so You can modify it with your graphics.
For php 5.3 or minor: To work the progress bar need you have the
PHP APC extension installed on your server. To verify if on your server is installed use
this pageFor php 5.04 or more:
To work the progress bar need you change some parameters in the php.ini file and you must start the session in the page where you put the upload.
The list of parameters you must setup in your php.ini file is:
session.upload_progress.enabled = On
session.upload_progress.cleanup = Off
session.upload_progress.prefix = "upload_progress_"
session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS"
session.upload_progress.freq = "1%"
session.upload_progress.min_freq = "1"
To start the session you must put this lines in the top of the file:
session_start();
?>
Total file size
File upload size can be limited for each file or for the sum of all the uploaded files.
This field is the file size limit for the sum of the uploaded files.
It can be limited on the server side (after upload)
If this field is void no limit size are applied.
All this features are for each file!!!
Upload Folder
Relative:
a Path relative to the Site or to the Document
ex: /MyFolder/
ex: ../MyFolder/
Use the search button to find Your Upload Folder
Absolute:
an Absolute Path
ex: c:\MyFolder\
With this You can save the file outside Your web site. Simply write the full path on the server as your upload folder!
Dynamic:
a dynamic path
In this case You must enter the name of your PHP function that will return the full file path.
Insert only the name of your function without the parenthesis
The extension send to your function 2 parameters: the form field name and the name of the uploaded file
For example:
<?php
function CreateUploadPath($form_field_name, $file_name){
//Here your php code
return $YourNewFileName;
}
?>
File Name
The name of the file uploaded.
All invalid characters used in the filename of the uploaded files are automatically removed.
Only letters, numbers and _-. are allowed.
Dynamic file name:
If checked You must enter the name of your PHP function that will return the file name.
Insert only the name of your function without the parenthesis
The extension send to your function 3 parameters the form field name, the name of the uploaded file and the path of the temporary uploaded file
For example:
<?php
function CreateFileName($form_field_name, $file_name, $temp_path){
//Here your php code
return $YourNewFileName;
}
?>
Allowed Extension
You can select which file extensions you want to allow your users to upload.
If this field is void no reTransitionalion are applied.
It can be limited on the server side (after upload) and on the client side (before upload).
To select which file extension you want to allow you must enter the list of extension/s separated by comma.
ex: txt,doc,pdf
Max File Size
File upload size can be limited for each file or for the sum of all the uploaded files.
This field is the file size limit foreach uploaded files.
It can be limited on the server side (after upload) and on the client side (before upload).
The file that exceed the size are skipped
If this field is void no limit size are applied
Max Dim If Image
The pixel Image dimensions can be limeted!
It can be limited on the client side (before upload).
If one of them exceed the dimension the Upload don't start.
Tha value are in Pixels.
You can limit only Width, only Height or the two dimension.
If this field/s is/are void no limit are applied.
The test if image is on the file extension's.
Conflict Handling
Should a file already exist on the server, you can specify how you would like to handle the new file. Choices include overwriting, giving the file a unique name and skipping the file.
If You select "Unique name" and a file exist my code add e progressive number to the file name.
ex: Existing file is MyFile.txt the new name will be MyFile
0.txt
Delete Existing File
You can specify to delete or not an existing file.
If You select Yes You must specify in which Field is stored the full name (Path and name) of the file You must delete.
This must be stored in the same record and in the same table of Your recordset.
Delete if no upload
With this option you can add to your update page a checkbox to force the delete file also if the user don't upload a new file. This can be used to have the option to delete only the actual file. If this checkbox is checked the file is deleted and the DataBase field is set to Null.
This image is an example:
Save File Name In
You can store the file names in your database!
This makes it easy to display them on your page, especially when using dynamic paths.
You can define the Saved File Name with 3 method:
- Site Path and Name (ex: "/MyFolder/MyFile.txt")
- Absolute Path and Name (ex: d:\inetpub\wwwroot\MySite\MyFolder\MyFile.txt")
- Only the name (ex: "MyFile.txt")
Save Size In
It is now possible save the file's dimensions into your database for later use.
Copy Value Button
You can set this option for each file. So if You upload more files You can have different option value for each uploaded files. But if You have more files and the same option you can enter the option value for the first file and click on the copy button to copy the same value for all the other files.
The copy button is not allowed if the first file is selected.
Save thumb name in
You can store the thumbnail names in your database!
This makes it easy to display them on your page, especially when using dynamic paths.
You can define the Saved Thumb Name with 3 method:
- Site Path and Name (ex: "/MyFolder/MyFile.txt")
- Absolute Path and Name (ex: "d:\inetpub\wwwroot\MySite\MyFolder\MyFile.txt")
- Only the name (ex: "MyFile.txt")