File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Attachments without forums?

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic