note description : "Basic Service that show how to Upload a file" date : "$Date$" revision : "$Revision$" class APPLICATION inherit WSF_DEFAULT_SERVICE redefine initialize end create make_and_launch feature {NONE} -- Initialization initialize -- Initialize current service. do set_service_option ("port", 9090) end feature -- Basic operations execute (req: WSF_REQUEST; res: WSF_RESPONSE) -- Execute the incomming request local file: WSF_FILE_RESPONSE l_answer: STRING do if req.is_get_request_method then if req.path_info.same_string ("/") then create file.make_html ("upload.html") res.send (file) else -- Here we should handle unexpected errors. end elseif req.is_post_request_method then if req.path_info.same_string ("/upload") then -- Check if we have an uploaded file if req.has_uploaded_file then -- iterate over all the uploaded files create l_answer.make_from_string ("