Attachment Downloads

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
Fyorl
Google Summer of Code Student
Posts: 27
Joined: Mon Apr 02, 2012 4:51 am
Location: UK
Contact:

Attachment Downloads

Post by Fyorl » Thu Aug 02, 2012 3:38 pm

I'm in the process of adding a feature to allow downloading all the attachments in a post and all the attachments in a topic. The files should be archived before the user is prompted for a download but as far as I can tell, none of the archiving libraries is enabled by default in PHP. Should the feature be disabled if there are no archiving options or just download each of the files unarchived?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1826
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Attachment Downloads

Post by DavidIQ » Thu Aug 02, 2012 5:09 pm

phpBB has it's own archiving routines available. Check includes/functions_compress.php.
Image

User avatar
Fyorl
Google Summer of Code Student
Posts: 27
Joined: Mon Apr 02, 2012 4:51 am
Location: UK
Contact:

Re: [RFC] Attachment Downloads

Post by Fyorl » Thu Aug 02, 2012 5:24 pm

So it seems tar is always supported but anything else is optional. Seems reasonable.

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] Attachment Downloads

Post by Pony99CA » Thu Aug 02, 2012 10:42 pm

Why is this an RFC? I see no Request for Comments or detailed proposal here, just a statement that you're working on code and a question. Are you going to edit the first post later?

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Attachment Downloads

Post by bantu » Fri Aug 03, 2012 9:00 am

Yes, it looks like tar is always available. zip and gz will likely be available too but depend on zlib. So it looks like you should offer all available formats.

I moved this to discussion because it's not in RFC format.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Attachment Downloads

Post by EXreaction » Fri Aug 03, 2012 3:51 pm

Wouldn't it be a good idea to look into a 3rd party library for compression? I thought there was something in Symfony for it (or maybe it was Zend) that worked really well.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] Attachment Downloads

Post by nickvergessen » Fri Aug 03, 2012 4:10 pm

The one which is already available in phpBB works just fine?
Member of the Development-TeamNo Support via PM

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Attachment Downloads

Post by bantu » Fri Aug 03, 2012 4:52 pm

EXreaction wrote:Wouldn't it be a good idea to look into a 3rd party library for compression? I thought there was something in Symfony for it (or maybe it was Zend) that worked really well.
Since we already have infrastructure for creating packages, that infrastructure should be used. It might make sense to replace that infrastracture with something better. This would should be a different project however and probably won't get high priority if there is no real gain.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Attachment Downloads

Post by EXreaction » Fri Aug 03, 2012 5:03 pm

Good point. If we already have zip support built in anyways that should be enough (everyone can extract either a zip or tar, so that should be fine).

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 366
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: [RFC] Attachment Downloads

Post by Paul » Fri Aug 03, 2012 7:45 pm

For at least some archives extracting does not work correctly, IIRC, it was reported a while back by me, and davidMJ couldnt find it back then. It should be somewhere in the bugtracker. I believe it was related to zips created on osX.

Post Reply