Я использую swfupload и хотел уведомить пользователя, что ему нужна установленная флэш-память для работы.
Я нашел это: http://swfupload.org/forum/generaldiscussion/2140, хотя понятия не имею, где мне нужно это реализовать.
Это мой код:
<script type="text/javascript">
var upload0, upload1, upload2, upload3, upload4, upload5;
window.onload = function () {
upload{$smarty.section.r.index} = new SWFUpload({
// Backend settings
upload_url: "{$REQUEST_URL}{if $swfcallbackid}/id/{$swfcallbackid}{/if}?swfcb={$row.formname}&{php}echo session_name();{/php}={php}echo session_id();{/php}",
file_post_name: "{$row.formname}",
post_params: {"{php}echo session_name();{/php}" : "{php}echo session_id();{/php}"},
// Flash file settings
file_size_limit : "500MB",
file_types : "{$row.mask|default:"*"}", // valid file type mask
file_types_description : "{$row.mask_desc|default:"All Files"}",
file_upload_limit : "0",
file_queue_limit : "1",
// Event handler settings
//swfupload_loaded_handler : swfUploadLoaded,
file_dialog_start_handler: fileDialogStart,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
//upload_start_handler : uploadStart, // I could do some client/JavaScript validation here, but I don't need to.
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
// Button Settings
button_image_url : "{$HOME}/webapp/shared/swfupload/XPButtonUploadText_61x22.jpg",
button_placeholder_id : "{$row.formname}_button",
button_width: 63,
button_height: 23,
button_window_mode: "TRANSPARENT",
// Flash Settings
flash_url : "/webapp/shared/swfupload/Flash/swfupload.swf",
custom_settings : {
progressTarget : "{$row.formname}_progress",
cancelButtonId : "{$row.formname}_cancel",
filenameDisplayId : "{$row.formname}"
},
// Debug settings
debug: false
});
}
</script>