[buddypress-trac] [BuddyPress Trac] #6278: Attachment Library

buddypress-trac noreply at wordpress.org
Tue Mar 17 18:05:20 UTC 2015


#6278: Attachment Library
------------------------------------+------------------
 Reporter:  imath                   |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  2.3
Component:  API                     |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by imath):

 In [changeset:"9622"]:
 {{{
 #!CommitTicketReference repository="" revision="9622"
 Introduces the BuddyPress Attachments API

 `BP_Attachment` is a new class custom and core components can extend to
 manage file uploads.

 - It is taking care of setting the uploads data (path, url..)
 - It is creating the specific base uploads directory for the component if
 requested
 - It is taking care of uploading the files into the uploads directory
 - Custom validation rules can be set in order to for instance: restrict
 mime types or file size
 - If, like avatars, cropping an image file is needed, the class includes a
 crop method to help you.

 `bp_upload_dir()` is also a new function to make sure the uploads data
 will always be the one of the site BuddyPress is activated on (the root
 site).

 Props johnjamesjacoby, boonebgorges

 See #6278
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6278#comment:48>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list