Re: Re: Re: [Zope] Limit size download file in Zope wih LocalFS

2007-01-08 Thread Alan

Thanks Dieter,

We use Plone 2.1.2, Zope (Zope 2.8.5-final, python 2.3.5, sunos5),
Python 2.3.5 (#1, Feb 14 2006, 10:51:41) with

LocalFS-1.7rc1-andreas.tar.gz modified
(#from OFS.content_types import find_binary
 from zope.app.content_types import find_binary)

It was working before we switched to apache. So I took a look at
LocalFS code and then I commented out line 66 (#
ITERATORS_PRESENT=1) forcing LocalFS to work without module
StreamingFile (from LocalFS). And Hallelujah! it solved our problem.

However, why Zope is not able to cope with filestream_iterator
anymore? What happened here since we only switched zope to apache? And
what we are loosing since I am not using filestream_iterator anymore?
A sort of performance?

Anyway, is there any new version of LocalFS to be downloaded?

Many thanks to you all guys.
Cheers,
Alan

On 07/01/07, Dieter Maurer [EMAIL PROTECTED] wrote:

Alan wrote at 2007-1-5 10:32 +:
 ...
If I try to download a file bigger than 128 kb, I got a smaller file
and when I 'cat' it I got the 'object' (like open file
'/scratch/ccpngrid/JOBS/PDBS_all.pdb', mode 'rb' at 0x323c7558)

Modern versions of LocalFS return a string for files
smaller than 128 kB and a filestream_iterator for larger files.

Of course, this requires a Zope version that already supports
filestream_iterators.

Apparently, your Zope version is too old for the LocalFS version
you are using.


You may upgrade your Zope, downgrade your LocalFS or
modify your LocalFS copy to always return a string.



--
Dieter




--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: Re: [Zope] Limit size download file in Zope wih LocalFS

2007-01-08 Thread Dieter Maurer
Alan wrote at 2007-1-8 15:48 +:
 ...
However, why Zope is not able to cope with filestream_iterator
anymore? What happened here since we only switched zope to apache?

The problem you have reported definitely has to do only with LocalFS
and Zope, not with Apache.

And
what we are loosing since I am not using filestream_iterator anymore?
A sort of performance?

Yes, but it may not be that much.

Without the filestream_iterators, the complete file is read into
memory and then delivered through a temporary file again.
This is deadly for file with a size in the order of GBs.

However, our LocalFS version (we still use LocalFS 1.3) reads the
file anyway (to determine its size). If this has not changed until
LocalFS, you will not loose that much.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] Limit size download file in Zope wih LocalFS

2007-01-07 Thread Dieter Maurer
Alan wrote at 2007-1-5 10:32 +:
 ...
If I try to download a file bigger than 128 kb, I got a smaller file
and when I 'cat' it I got the 'object' (like open file
'/scratch/ccpngrid/JOBS/PDBS_all.pdb', mode 'rb' at 0x323c7558)

Modern versions of LocalFS return a string for files
smaller than 128 kB and a filestream_iterator for larger files.

Of course, this requires a Zope version that already supports
filestream_iterators.

Apparently, your Zope version is too old for the LocalFS version
you are using.


You may upgrade your Zope, downgrade your LocalFS or
modify your LocalFS copy to always return a string.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] Limit size download file in Zope wih LocalFS

2007-01-05 Thread Alan

Thanks Andrea for your attention.

Not clear error message.

If I try to download a file bigger than 128 kb, I got a smaller file
and when I 'cat' it I got the 'object' (like open file
'/scratch/ccpngrid/JOBS/PDBS_all.pdb', mode 'rb' at 0x323c7558)

Playing with the browser mode of LocalFS (tab 'View' in ZMI) I can
upload big files but I get the same problem as above when downloading.

The first thing I did was to ask to our server administrator and so
far she told me nothing was done but migrating our portal to apache,
yet she pointed out the fact that everything else is working but
LocalFS, then the likely culprit is LocalFS... Anyway, it was working
before...

Cheers,
Alan

On 04/01/07, Andreas Jung [EMAIL PROTECTED] wrote:

- --On 4. Januar 2007 17:52:07 + Alan [EMAIL PROTECTED] wrote:

 Hi List!

 I got a problem. I found out that any file located in a LocalFS folder
 bigger than 128 Kb (precisely 131071 bytes) cannot be download from
 zope portal since the administrator move it over apache.

 I mean, I can download a pdf file of 8 Mb from Plone, but I cannot
 download
 any file from a LocalFS area bigger than the value above.



Any particular error message? Your administrator might have limited
the size for POST requests?

- -aj

--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] Limit size download file in Zope wih LocalFS

2007-01-05 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

How to reproduce with a bare Zope instance with LocalFS installed?

- --On 5. Januar 2007 10:32:39 + Alan [EMAIL PROTECTED] wrote:

 Thanks Andrea for your attention.

 Not clear error message.

 If I try to download a file bigger than 128 kb, I got a smaller file
 and when I 'cat' it I got the 'object' (like open file
 '/scratch/ccpngrid/JOBS/PDBS_all.pdb', mode 'rb' at 0x323c7558)

This indicates that you're trying to access something that you should.
Please explain *carefully* what you are doing.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFnizVCJIWIbr9KYwRAkrlAJ9w0jUKtPHVAJUKE1jrJFLEe78KhgCeOdRm
ribsLY6YmkytriUteARmMoQ=
=C3/v
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Limit size download file in Zope wih LocalFS

2007-01-04 Thread Alan

Hi List!

I got a problem. I found out that any file located in a LocalFS folder
bigger than 128 Kb (precisely 131071 bytes) cannot be download from
zope portal since the administrator move it over apache.

I mean, I can download a pdf file of 8 Mb from Plone, but I cannot download
any file from a LocalFS area bigger than the value above.

This issue sounds very unusual to me and I am not completely sure if I
am reporting fine, specially because I am not the zope server
administrator, I just have a plone account to develop a product.

I hope someone else can help me here, any hint would be very welcome.
Many thanks in advance.

Cheers and Happy New Year 2007.
Alan

--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28



--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Limit size download file in Zope wih LocalFS

2007-01-04 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 4. Januar 2007 17:52:07 + Alan [EMAIL PROTECTED] wrote:

 Hi List!

 I got a problem. I found out that any file located in a LocalFS folder
 bigger than 128 Kb (precisely 131071 bytes) cannot be download from
 zope portal since the administrator move it over apache.

 I mean, I can download a pdf file of 8 Mb from Plone, but I cannot
 download
 any file from a LocalFS area bigger than the value above.



Any particular error message? Your administrator might have limited
the size for POST requests?

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFnUDMCJIWIbr9KYwRAo80AJ0Z5fPz99dkQW7KvPDNV6EsA0jE4QCeIjq6
7DQ6zold+iOZ/Q4qJ6J8CuI=
=p0Ms
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )