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

buddypress-trac noreply at wordpress.org
Tue Mar 17 04:54:59 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):

 Thanks DJPaul, johnjamesjacoby, modemlooper & henry.wright for your
 feedbacks.

 In 6278.07.patch, I've tried to fix the i18n issue (i guess my bad english
 isn't helping me!), code style... But i guess the best will be to show me
 exactly where the remaining problems are in this area.

 I've included a crop method to the `BP_Attachment` class. I think if we do
 so, we must be sure people will only play in the uploads dir.

 I've made the action and file_input parameters '''required''' parameters.
 Meaning if they are not set, nothing will happen. Anyway, WordPress needs
 them.

 FInally, i've included a validation rule if the `original_max_filesize` is
 set, else, the file size wasn't checked and i've found it weird to provide
 this parameter without using it.. Of course, the method can still be
 overriden from the child class.

 I've also added a bunch of unit tests.

 To use them, you'll need to create a `files` subfolder to
 `tests/phpunit/assets` and put in it
 - https://buddypress.org/media/buddypress_logo.pdf
 - https://buddypress.org/media/disc.png
 - any random jpg file you will call "buddypress-book.jpg" (i've used this
 [https://buddypress.org/wp-content/themes/buddypress-org/images
 /buddypress-packt.jpg file] and renamed it)

 Now, i think the sooner we'll get this in (and iterate when needed) will
 be the better. It will be easier for people to test and easier for me to
 work on #6290. I really think we need to try to provide a UI plugins will
 be able to use in association with this API.

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


More information about the buddypress-trac mailing list