This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JForum and the fly likes Attach Files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Attach Files" Watch "Attach Files" New topic
Author

Attach Files

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ok, so I figured out how to make an attachment. It turns out the file I was trying to attach was empty and therefore would not attach.

I am still wondering if their is any way to attach a file to a private message?

Thanks,

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

Joined: Apr 22, 2012
Posts: 17424
How do I attach a file? I have tried using the attach files button, then browsing to the file I wish to attach but have not been able to do so. I even tried in the test area of this forum but with no luck. I have also tried to attach a file to this post. We will see if it works.

Also, can an attachment be added to a private message?

Thakns,

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

Joined: Apr 22, 2012
Posts: 17424
No, it's not possible to attach files to private messages yet. In fact, this was a missing feature in 2.1.6 :\

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

Joined: Apr 22, 2012
Posts: 17424
Rafael, I am willing to implement this feature. I am using the latest release, 2.1.8, and I would like to add the support over that version. I am ready to start working right now as I need that feature.

How should I go about this so that it can be added to new versions (JForum 3)? The page about how to contribute is not yet available.

Thanks in advance,

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

Joined: Apr 22, 2012
Posts: 17424
Take a look at the code of PostAction.java, method insertSave(), and then at PrivateMessageAction.java. There you will find the calls (PostAction.java) to handle Attachments.

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

Joined: Apr 22, 2012
Posts: 17424
Thanks a lot, I just saw your post. It is great working with JForum, I had no trouble finding the places where I had to make the changes.

I am nearly done, the attachments for private messages are working now. You had left the tables and entity classes ready (I suppose you planned to implement it, thanks again), I just had to change the actions, DAO, etc. I will now look into the quota checking configuration to add that control.

Let me know how to contribute the attachment support.
[originally posted on jforum.net by andune76]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Attach Files
 
Similar Threads
Happy New Year! Welcome to our new forums!
error in output of First program in HFSJ
insert CSV values from file to MySQL
Configuration of Jboss in Eclipse
java mail attachments