IRC log of #zope3-dev for Saturday, 2005-01-15

*** gintas has quit IRC00:03
*** J1m has quit IRC00:04
*** ChanServ sets mode: +o hazmat00:06
*** srichter has quit IRC00:35
*** deo has quit IRC00:50
*** bskahan has quit IRC00:55
*** srichter has joined #zope3-dev01:03
*** ChanServ sets mode: +o srichter01:03
*** PalmTree has quit IRC01:19
*** zmogelis has joined #zope3-dev02:36
*** zmogelis__ has quit IRC02:37
*** zmogelis has quit IRC02:39
*** benji_york has quit IRC02:52
*** Damascus- has joined #zope3-dev03:03
Damascus-hmmm.  http://irclogs.espnow.net/zope3/ not showing up03:04
*** foom has joined #zope3-dev03:07
*** foom has left #zope3-dev03:09
*** bskahan has joined #zope3-dev04:38
*** bradb has quit IRC04:40
*** Damascus- has quit IRC04:44
*** d2m has quit IRC04:46
*** bskahan has quit IRC06:04
*** RaFromBRC has quit IRC06:30
*** mooded has quit IRC06:38
*** sashav has quit IRC08:13
*** tav has quit IRC08:32
*** BjornT has quit IRC08:32
*** jack-e|away has quit IRC08:32
*** jan_s has quit IRC08:32
*** rabidbt has quit IRC08:32
*** Damascene has quit IRC08:32
*** __gotcha has quit IRC08:32
*** jan_s has joined #zope3-dev08:32
*** tav has joined #zope3-dev08:32
*** BjornT has joined #zope3-dev08:32
*** __gotcha has joined #zope3-dev08:32
*** Damascene has joined #zope3-dev08:32
*** jack-e|away has joined #zope3-dev08:32
*** rabidbt has joined #zope3-dev08:32
*** hazmat has quit IRC09:55
*** zagy has joined #zope3-dev11:20
*** jan_s has quit IRC11:34
*** RaFromBRC has joined #zope3-dev11:39
*** sashav_ has joined #zope3-dev11:43
*** sashav_ has quit IRC11:52
*** d2m has joined #zope3-dev11:58
*** sashav has joined #zope3-dev12:29
*** Theuni has joined #zope3-dev13:19
*** mooded has joined #zope3-dev13:22
*** projekt01 has joined #zope3-dev14:04
*** jhauser has joined #zope3-dev15:17
*** sashav has quit IRC16:43
projekt01Janko; did you see my mail about Ifile?16:52
*** sashav has joined #zope3-dev16:52
jhauseryes16:55
jhauserbut the problem suddenly rises16:56
jhauserdi I understand one of the problems right, that you want different content types regarding the mime-type of the uploaded file?16:57
jhauserprojekt01 I would defer this to the work of adapters16:58
*** sashav_ has joined #zope3-dev16:58
jhauserin this regard I also would not like to include an editing window for text content16:58
jhauserat least not in the first try16:59
*** sashav|wshop has joined #zope3-dev16:59
projekt01Ok17:02
jhauserprojekt01 is the contenttype file working right in regards of memory consumption and storing of data?17:03
projekt01Where is responsible for the mime-type?17:03
projekt01The filename of the object or the upload?17:03
projekt01Yes the File is working correct, it seams that the File uses FileChink for bigger uploads17:04
jhauserthe filename of the uploaded file is an property of the upload object17:04
projekt01Correct, you speak about your implementation and not like the File of Zope3?17:05
jhauserit can be used as a name17:05
jhauserI think we need to differentiate between a schema field file and a file content object17:05
jhausera schema field say that file-like data is stored under the given fieldname at the object which implements the schema17:06
jhauserthe fieldname has nothing to do with the filename of the uploaded object17:06
projekt01Ok, if I understand we can have a file called word.doc and the upload is a test.txt file17:07
projekt01How can we handle this?17:07
jhauserno17:07
jhauseryou think in terms of content object17:08
projekt01Yes17:08
jhauserok17:08
jhauserso if we add a file content object (cobj) it should have an upload form field in the addform17:09
projekt01Ok17:09
projekt01The object declares the filename e.g. word.doc17:09
jhauserthe file content object would need to implement a schema with a file schema field17:09
jhauserin the addform the user can give the new cobj a name or use the name of the uploaded file as a default name17:10
jhauserah I see the problem17:11
projekt01Yup...17:11
projekt01The first step is add the object with a name17:12
projekt01It could be word.doc17:12
jhauserthe current cobj file holds the data directly in a chunked data structure, same with mime type and filename17:12
projekt01Which says something about the mime-type17:12
jhauserbut the mime-type is only an attribute, which can be changed, if a new file is uploaded17:13
projekt01Stop17:13
projekt01Here we get into trouble17:13
projekt01The filename says something about the mime-type17:14
projekt01And the upload can be different17:14
jhausereh perhaps to the user, but not to the system17:14
projekt01Ok17:14
projekt01Perhaps we have to prevent uploading different mime-types if we have a filename17:15
jhausera filename wich says something about the mimetpye17:15
projekt01I think it's important not to ignore the filename17:15
jhauserI can name my file 'dada'17:15
projekt01Yes, but should we ignore the normal pattern for windows?17:16
*** sashav_ has quit IRC17:16
jhauserok, this would mean we implement something like an filename extension handler17:16
jhauserbut this is way beyond the scope of a file schema field :-)17:17
jhauserit is actually a policy of the cobj17:17
projekt01Ok17:17
jhauserand let me end the problem i mentioned above17:17
projekt01Ok17:18
jhauserthe current file cobj IS the file17:18
jhauserwith the file schema field the file is stored as an object at the cobj17:18
jhauserso also other content objects like for example email can have a file field, where the attachment is stored17:19
jhauserthis means that we need to introduce a new file content object or change the current if we implement a file schema field17:20
jhausercorrect?17:20
projekt01The file content object is the file17:20
projekt01Your solution ends in a file container like object17:21
jhauseryes17:21
projekt01Where we can have more then one file as a kid of childs17:21
jhauseryes17:21
projekt01This needs special upload forms which can handle multi file upload17:21
jhauserand we could also have different file content objects17:22
projekt01I thin k this is a special use case and content type implementation17:22
jhausera wordfile cobj for example with special methods to present word metadata17:22
jhauserthat's all not the business of the file schema field17:22
*** sashav|wshop has quit IRC17:23
*** sashav has quit IRC17:23
projekt01Ok, but the File right now needs some refactoring17:24
projekt01You speak about another implementation of a content type right now17:24
jhausersure, but I do not now where the current file cobj does get it's data from17:24
jhausernow/know17:24
projekt01You describe a logic construct of a content type which can handle extended information for files17:25
jhauseryes17:26
projekt01Ok17:26
*** Jim7J1AJH has quit IRC17:26
projekt01The file itself is just a upload17:26
projekt01Like we have in FileChunk right now?17:26
projekt01What do you think about to enhance this base File implementation first?17:27
jhauserno, the current file cobj implementation would be used as the basis for the field object17:27
jhauseran arbitrary object, which hold internally the chunked data structure and also the attributes filename and mime-type17:28
jhausercobj -> schemafilefield -> chunked_data17:29
projekt01We have already a FileChunk object in Zope3, but it's just used for bigger uploads17:29
projekt01Should we enhance this FileChunk class and add this subinformation there?17:29
jhauseryes would be possible17:30
projekt01Ok, I understand, that's the base work what I tried to describe before17:30
projekt01Later we can add sepcial content type File objects which acts like we need17:30
jhauserah one think wich speaks against filechunk as a basis, that the serving of chunked data is not done there17:32
jhauserthink/thing17:32
projekt01What do you mean with not done there?17:33
jhauserif we want a field, which can also be used at other content objects a basis serving method needs to be in the field implementation17:33
jhauserif you compare FileChunk with the _setdata method of File than you see the actuall work, which needs to be done in the file schema field17:35
jhauseralso if you look at the index_html implementation of zope2 file you see how much trickery is needed to serve the data17:35
jhauserah ok, but this can be done by the display widget or some display widget17:36
jhauserperhaps, not sure about this17:36
jhauserbut problem of handling of large data is the main reason, why there are so many different implementations in the zope2 world17:37
*** tav_ has joined #zope3-dev17:37
projekt01Can we define a schema for this, I'm not sure if I understand this right?17:38
jhausercan't we simply use file as the basis?17:39
jhauserthere is nothing in there, what is specific for a contentobject, except the IFileContentMarker17:40
projekt01Ok, I think you will use something like a hook object which stores additional data like mime-types for the upload17:41
projekt01Correct?17:42
jhauserthat was the problem I mentioned in the mail and we discussed once here17:42
jhausera file is not a single field, but also has the information filename, size, mime type17:43
jhausermy thinking is, and I also think the result of the discussion was, that this information is stored in the object, which is the file schema field17:44
jhauserto use this information one would call an adapter on the schema field, which extracts the information17:44
jhausersimilar to imageinfo17:44
projekt01Yes that's right17:45
projekt01Let's se if this is correct:17:45
projekt01class FileUploadField(IField):17:45
projekt01    """File upload Field handles additional info"""17:45
projekt01class IFile(Interface):17:45
projekt01    data = FileUploadField...17:45
projekt01class File(object):17:45
projekt01    def __init__(self, data):17:45
projekt01        self.data = FileUpload(data)17:45
projekt01class FileUpload(object):17:45
projekt01    """The file upload"""17:45
projekt0117:46
projekt01    def mimeType(self)17:46
projekt01Perhaps we need another place for defining the schema where we don't loose the formating17:46
jhauseryes although FileUpload would be implemented like the current file17:47
projekt01And uses the FileChunk if needed for to store the data (upload), right?17:47
jhauserFileUpload(Persistent) ...17:47
projekt01sure17:48
jhauseryes like the current file17:48
jhauserFile class17:48
jhauserok17:48
projekt01Let's use the branch for defining the schema17:48
jhausersure17:49
*** tav has quit IRC17:49
jhauserin schema or somewhere in file17:49
jhauserI would suggest schema17:49
projekt01Let's directly change the File, Ifile etc. and add a FileUpload class17:51
jhauserhm but later you want to do a17:52
projekt01Make the File work with the sub object FileUpload17:52
jhauserfrom zope.schema import FileUploadfField17:52
jhauserah ok17:52
projekt01And the FileUpload should use the FileChunk if needed17:52
jhauseryes and I would not call it Upload17:53
projekt01Of corse we have to add the IFile field17:53
projekt01And later we can add the widgets17:53
jhauserbecause the upload is only defined through the widget, it can also be created from reading from the filesystem or so17:54
projekt01What do you think about IFile and IFileData17:54
projekt01And IFileDataWidget17:55
jhauseryes although Jim mentioned Mime something17:55
projekt01Or IFileUploadWidget17:55
jhauserIMImeField/MimeField17:56
projekt01I think mime is just one part of it17:56
jhauserok17:56
projekt01What do we have to store exactly on this file upload object?17:56
projekt01Mime-type17:57
projekt01and17:57
jhausersize17:57
jhauserit is costly to always use getSize17:57
jhauserand after upload it does not change17:57
jhauserthe original filename17:57
jhauserthat's it I think17:58
projekt01Hm, yes but where do you need the size of the file upload object?17:58
projekt01What's about the filename?17:58
projekt01Of the upload17:58
jhauseryes the original filename of the upload needs to be stored17:59
jhauserthe size is needed always17:59
projekt01Let's see we store the filename, mime-type, the data itself and pehaps the size17:59
jhauserto present it, to be used in the widget, if the file is served17:59
jhauseryes18:00
projekt01Should we really call this IMime18:00
jhauserno let's start with FileData18:00
jhauserwe can rename it later18:00
projekt01Let's define Imime and inherit IFileData form Imime, and let define more sub interfaces if need more18:02
projekt01A little bit overhead but simply and clear18:02
jhausernice18:04
jhauserare you typing, or should I do it?18:05
projekt01This way we can support a IMime adapter which returns the mime-type, otherwise we have to define the adapter to IFileData18:05
jhauseryes this is nice18:05
projekt01Can you start, I have to leave now, I will start tonight18:06
projekt01Can we split the work in differnet parts?18:06
jhauserI probably need help for the tests18:06
jhauserI will take a look at the current file tests18:07
projekt01I can start at the end and implement the widget and adapters18:07
jhauserok18:07
projekt01Test are ot the problem, I can add it if you implement something18:07
projekt01ot/not18:07
projekt01I also can start adding adapters for IMime etc18:08
jhausernice, I need to learn it nevertheless18:08
jhauserOk I concentrate at the file field for the moment18:08
jhauserdo you have time pressure for the usage of this?18:08
projekt01Yes18:08
jhauser:-) ok18:09
projekt01But I think I work next week with Dominik Huber and this18:09
projekt01So I think we can finish this next week18:09
jhauserok we should have something in the next days18:10
projekt01I hope the impact for BBB is not to big18:10
jhauserwhat is BBB?18:10
projekt01If we are finish, I like to add i18n support too18:10
projekt01BBB = backward compatiblity or how do you call this18:11
jhauserthe tests should show this18:11
jhauserok let's start, see you later or tomorrow18:12
projekt01Yup18:12
projekt01Are on IRC tomorrow?18:12
projekt01Write a mail if you have questions or if I need to implement something18:12
jhausersure18:13
projekt01Otherwise I start with adapters and widgets18:13
projekt01See you tomorrow or deep I the night...18:15
*** mooded has quit IRC18:28
*** mgedmin has joined #zope3-dev18:38
*** RaFromBRC has quit IRC19:36
*** __gotcha_ has joined #zope3-dev19:56
*** __gotcha has quit IRC19:57
*** hazmat has joined #zope3-dev19:59
*** zagy has joined #zope3-dev20:00
*** tvon has quit IRC20:03
*** zagy has quit IRC20:03
*** testMM has joined #zope3-dev20:32
*** RaFromBRC has joined #zope3-dev20:33
*** RaFromBRC has quit IRC20:49
*** testMM has left #zope3-dev20:50
*** hazmat has left #zope3-dev21:14
*** PalmTree has joined #zope3-dev21:30
*** mooded has joined #zope3-dev21:30
*** tvon has joined #zope3-dev22:31
*** mooded has quit IRC22:39
*** tvon has quit IRC22:53
*** PalmTree has quit IRC22:54
*** mgedmin has quit IRC23:18
*** mgedmin has joined #zope3-dev23:26

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!