hi,<br /><br />I have to deal with flash players (I&#39;m deeply ashamed for what I&#39;m doing ;-), and their somewhat cumberstone constraints. <br /><br />The main part of the communication is handled via an tcp socket using the amf protocol. But I have to handle &quot;file uploads&quot; via http POST multipart from client to server and sending it back to the flash player since flash only allows domain specific content - no content from the users&#39; file system. <br /><br />So my first attempt to solve this big mess was to create a tac like that:<br /><br />############################################<br />tac file<br />############################################<br /><br />import sys, os<br /><br />sys.path.append(os.getcwd())<br /><br />from twisted.application import internet, service<br /><br /># my custom backend factory subclassed from ServerFactory<br />from socketManager import SocketManager <br /><br />from policySocketFactory import PolicySocketFactory<br />from twisted.web2 import server, channel, static<br />from twisted.application import service, strports<br />from fileupload import Toplevel<br /><br />application = service.Application(&#39;backend&#39;)<br /><br /># backend service - all client/server communication should go via that sockets<br />backendService = internet.TCPServer(8600, SocketManager())<br />backendService.setServiceParent(application)<br /><br /># policy service<br />socketPolicyService = internet.TCPServer(8601, PolicySocketFactory(&#39;socket-policy.xml&#39;))<br />socketPolicyService.setServiceParent(application)<br /><br /># http service<br />site = server.Site(Toplevel())<br />fileUploadService = strports.service(&#39;tcp:8080&#39;, channel.HTTPFactory(site))<br />fileUploadService.setServiceParent(application)<br /><br />############################################<br /><br />Authentication /Authorization is implemented in the backend service, so I&#39;m searching for a solution to fire some sort of event in the fileUploadService to be handled in the backendService, and to restrict the file upload to already logged in users. I thought about using &quot;inotify&quot; for watching the upload directory, but I would prefer a twisted /pythonic solution. Perhaps someone could give me some advice about what would be a sane way to solve this 2 problems. <br /><br />Thank you in advance,<br /><br />Stefan K&ouml;gl<br type="_moz" />