Tragen / myroundcube

Automatically exported from code.google.com/p/myroundcube
0 stars 0 forks source link

[detach_attachments] Practical use of files over 300MB difficult #746

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Token: 477454a0a1ee5f60295441a1dca311a8 (Don't modify this token!)
Version: 2.3.26 (20-07-2014)
PHP: 5.4.34-pl0-gentoo
RCMAIL: 1.0.3
Database: mysql
SERVER: Apache
----
I.  Issue Description:
Can not be used with files over 300MB

Need nmore than 8 * size_of_file memory.
4 * size_of_file - database_attachment
more than 4 * size_of_file - datach_attachment
+ memory for mysql.
When downloading the entire file is loaded into RAM.

II. Steps to reproduce the Issue:
Try to send file more 1 Gb.

III.
Can make storing attachments in the file, bypassing the cache in 
database_attachment. And download of attachments to make small parts?

Original issue reported on code.google.com by ale...@gelicon.ru on 11 Nov 2014 at 11:06

GoogleCodeExporter commented 8 years ago
This is a bug tracker and not a support forum. Goto 
https://forum.myroundcube.com to disucss such things please.

Original comment by myroundc...@gmail.com on 11 Nov 2014 at 2:41

GoogleCodeExporter commented 8 years ago
300 MB is far away from an email size that should be handled by IMAP. Use FTP.

Original comment by myroundc...@gmail.com on 11 Nov 2014 at 3:07

GoogleCodeExporter commented 8 years ago
> Use FTP
HTTP links in the email it is more convenient for the majority people.

Original comment by ale...@gelicon.ru on 11 Nov 2014 at 5:31

GoogleCodeExporter commented 8 years ago
300 MB file uploads is nothing what should be handled by a web application. 
Most installation don't allow such big file uploads. Please don't respond 
anymore. My decision is final: WONTFIX.

Original comment by myroundc...@gmail.com on 11 Nov 2014 at 5:44

GoogleCodeExporter commented 8 years ago
Clearly. Thank you.
I patched up their version of the functional and I can send you a patch.

Original comment by ale...@gelicon.ru on 11 Nov 2014 at 6:08

GoogleCodeExporter commented 8 years ago
Yes, please feel free to send or post a patch. Thanks.

Original comment by myroundc...@gmail.com on 12 Nov 2014 at 4:43

GoogleCodeExporter commented 8 years ago
Please send the code detach_attachments.php with regular format. I can make a 
diff file.

Original comment by ale...@gelicon.ru on 12 Nov 2014 at 10:10

GoogleCodeExporter commented 8 years ago
Patch .

Original comment by ale...@gelicon.ru on 13 Nov 2014 at 7:01

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by myroundc...@gmail.com on 14 Nov 2014 at 3:08

GoogleCodeExporter commented 8 years ago
Unfortunately I can't apply your patch. 'database_attachments' plugin is a 
default Roundcube plugin. Please go to http://trac.roundcube.net, open a ticket 
and post your patch there. Roundcube developers will decide if they apply your 
patch.

Please let me know what's the sql script supposed to do. 'attachment' database 
table does not have a field 'filename'.

Original comment by myroundc...@gmail.com on 15 Nov 2014 at 5:02

GoogleCodeExporter commented 8 years ago
Understandably. This version to work with the non patched 
'database_attachments'.

SQL script adds a column to store the file path in the table `attachments`.

Original comment by ale...@gelicon.ru on 15 Nov 2014 at 10:10

Attachments:

GoogleCodeExporter commented 8 years ago
I'm sorry. I don't understand your patches. I don't see changes in your patch 
which could be related to store file paths. Closing now.

Original comment by myroundc...@gmail.com on 15 Nov 2014 at 2:47

GoogleCodeExporter commented 8 years ago
I changed the order of function calls to the hook `attachement_upload`. Made a 
call to the function class `detach_attachments` earlier. If you exceed the size 
of the file specified in `detach_attachment_db_max_size` function 
`detach_attachments::detach()` deletes file data and makes it impossible for 
caching `database_attachments`.

Modification of class `database_attachments` in this case is not required.

Original comment by ale...@gelicon.ru on 17 Nov 2014 at 6:01