• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Attachments without forums?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
reply
    Bookmark Topic Watch Topic
  • New Topic