Nino connector:
- fixed issue related to `ready_for_reading' now use the `try_...' variant - for now Nino does not support persistent connection, then we have to respond with "Connection: close" REQUEST_FILE_SYSTEM_HANDLER: - added not_found_handler and access_denied_handler, so that the user can customize related response WSF_REQUEST and WSF_VALUE: - modified how uploaded file are handled, fixed various issues, and added WSF_UPLOADED_FILE (it is a WSF_VALUE) WSF_VALUE: - added change_name (a_name: like name) - added url_encoded_name to other WSF_values WSF_REQUEST: - added `destroy' to perform end of request cleaning (such as deleting temp uploaded files) - renamed `raw_post_data_recorded' as `raw_input_data_recorded', and related feature - do not store the RAW_POST_DATA in meta variable anymore, but in WSF_REQUEST.raw_input_data is asked Added WSF_HTML_PAGE_RESPONSE to help user WSF_REPONSE.redirect_... now use "temp_redirect" as default instead of "moved_permanently" which is specific usage Removed many obsolete features.
This commit is contained in:
@@ -1,103 +0,0 @@
|
||||
note
|
||||
description: "Summary description for {WGI_UPLOADED_FILE_DATA}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WGI_UPLOADED_FILE_DATA
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (n: like name; t: like content_type; s: like size)
|
||||
do
|
||||
name := n
|
||||
content_type := t
|
||||
size := s
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
name: STRING
|
||||
-- original filename
|
||||
|
||||
content_type: STRING
|
||||
-- Content type
|
||||
|
||||
size: INTEGER
|
||||
-- Size of uploaded file
|
||||
|
||||
tmp_name: detachable STRING
|
||||
-- Filename of tmp file
|
||||
|
||||
tmp_basename: detachable STRING
|
||||
-- Basename of tmp file
|
||||
|
||||
feature -- Basic operation
|
||||
|
||||
move_to (a_destination: STRING): BOOLEAN
|
||||
-- Move current uploaded file to `a_destination'
|
||||
require
|
||||
has_no_error: not has_error
|
||||
local
|
||||
f: RAW_FILE
|
||||
do
|
||||
if attached tmp_name as n then
|
||||
create f.make (n)
|
||||
if f.exists then
|
||||
f.change_name (a_destination)
|
||||
Result := True
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Status
|
||||
|
||||
has_error: BOOLEAN
|
||||
-- Has error during uploading
|
||||
do
|
||||
Result := error /= 0
|
||||
end
|
||||
|
||||
error: INTEGER
|
||||
-- Eventual error code
|
||||
--| no error => 0
|
||||
|
||||
feature -- Element change
|
||||
|
||||
set_error (e: like error)
|
||||
-- Set `error' to `e'
|
||||
do
|
||||
error := e
|
||||
end
|
||||
|
||||
set_tmp_name (n: like tmp_name)
|
||||
-- Set `tmp_name' to `n'
|
||||
do
|
||||
tmp_name := n
|
||||
end
|
||||
|
||||
set_tmp_basename (n: like tmp_basename)
|
||||
-- Set `tmp_basename' to `n'
|
||||
do
|
||||
tmp_basename := n
|
||||
end
|
||||
|
||||
invariant
|
||||
|
||||
valid_tmp_name: not has_error implies attached tmp_name as n and then not n.is_empty
|
||||
|
||||
note
|
||||
copyright: "2011-2011, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
5949 Hollister Ave., Goleta, CA 93117 USA
|
||||
Telephone 805-685-1006, Fax 805-685-6869
|
||||
Website http://www.eiffel.com
|
||||
Customer support http://support.eiffel.com
|
||||
]"
|
||||
end
|
||||
Reference in New Issue
Block a user