This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JForum and the fly likes Attachments without forums? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Attachments without forums?" Watch "Attachments without forums?" New topic
Author

Attachments without forums?

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I am adding attachments to PrivateMessages. When I begin to handle the attachments received, I need to create an instance of AttachmentCommon with a forum id that allows JForum to decide whether or not to allow the attachments.

In the new scenario, there is no Forum in the context, because there is no Post.

I propose to create a new AttachmentCommon constructor that establishes by default that attachments are allowed (setting canProceed to true).

I would like to hear your opinions.

Thanks in advance,
Diego


[originally posted on jforum.net by andune76]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Finally got around to look at this code... my suggestion would be to have a constructor like:

AttachmentCommon( request, int id, boolean isPrivateMessage)

If privateMessage is true, then there should be a check against a new global config setting that verifies that private message attachments are allowed or not. This also means that the id parameter should be handled as the PM id rather than a Forum Id.

Also, it would be nice to verify that the Quota code can limit the maximum disk space that a user can use with stored PM attachments.


[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thank you very much. Ok, that sounds good, I'll check how it looks with the rest of the code. I'll add the check, �Should I add that configuration property to SystemGlobals.properties?

I'll look into the quota checking code and try to add support for that.



[originally posted on jforum.net by andune76]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Attachments without forums?
 
Similar Threads
Lunar Calendar using JavaScript and HTML
automatic display of the java list on mouseover an image
Adding attachments to web service response
What have I messed up this time
How to get the contents of message from the soap request