File storage providers

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.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.
Post Reply
Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

File storage providers

Post by Senky »

If I do not miss something, there is only one way of handling uploads in phpBB - plupload. Right?

I think we should, in a world of cloud computing and remote data storages, start to discuss on how to make phpBB handle different upload providers.

The idea is like this:
  • provide an abstraction over file uploads in phpBB
  • provide a default provider - plupload
  • enable extensions to add custom providers (Amazon S3, Dropbox, Azure, ...)
  • phpBB would only be a mediator between enduser and the provider - it would take a file from the user and forward it to the provider
  • provider class would be responsible for permanent file storage and permanent accessibility of the file, giving phpBB only unique identification of the image (that would be used to link file to post/avatar)
What are your ideas about this?
Last edited by Senky on Sat May 28, 2016 8:48 am, edited 1 time in total.

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

Re: Upload providers

Post by Paul »

S3/Dropbox are storage providerd, how is that related to how the file is uploaded? What you want is storage providers, not upload providers.

Rhino.Freak
Registered User
Posts: 48
Joined: Thu Dec 24, 2015 10:47 am

Re: Upload providers

Post by Rhino.Freak »

I actually like the idea of cloud storage linking but how would that work?

CHItA
Development Team
Development Team
Posts: 169
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: Upload providers

Post by CHItA »

Rhino.Freak wrote: Fri May 27, 2016 2:55 pm I actually like the idea of cloud storage linking but how would that work?
You implement the filesystem interface with the clouds API or with something like flysystem + swap out the basic PHP filesystem functions in the core to use the filesystem interface.

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: Upload providers

Post by Senky »

paulus wrote: Fri May 27, 2016 11:09 am S3/Dropbox are storage providerd, how is that related to how the file is uploaded? What you want is storage providers, not upload providers.
Sorry, I was maybe just confusing. CHItA explained it clearly. We would implement the filesystem interface and let various providers handle the files in their way. As I think of it now, it has nothing to do with uploading process :D

User avatar
david63
Registered User
Posts: 355
Joined: Mon Feb 07, 2005 7:23 am

Re: File storage providers

Post by david63 »

Is this not something that could/should be handled with one or more events with extensions customised for the various storage facilities?
David
Remember: You only know what you know -
and you do not know what you do not know!

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: File storage providers

Post by Senky »

david63 wrote: Sat May 28, 2016 9:20 am Is this not something that could/should be handled with one or more events with extensions customised for the various storage facilities?
It's also the way, but the same can be told about cache providers, auth providers, avatar providers, etc.

User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 195
Joined: Thu Sep 09, 2010 11:36 am
Location: Munich, Germany

Re: File storage providers

Post by Marc »

I'd like to point out that there is already a ticket for splitting the file storage in the classes used for uploading files:
https://tracker.phpbb.com/browse/PHPBB3-14169

rubencm
Development Team
Development Team
Posts: 32
Joined: Sun Mar 12, 2017 8:30 pm
Location: h[b]ell[/b]o

Re: File storage providers

Post by rubencm »

This is almost working now, you can test it and report bugs

Post Reply