| Author |
File upload
|
Migrated From Jforum.net
Ranch Hand
Joined: Apr 22, 2012
Posts: 17424
|
|
Hi,
I try to extend the forum. I create a page where there is a form to upload a file. In the action (referred to this page) I must insert the code to upload the file.
Here there are my problems.
I try to insert this code:
But the request I have in JForum (this.request) is a RequestContext and not an HttpServletRequest class.
How can upload a file in JForum? Do I have to use some particular classes?
Thanks, bye bye.
[originally posted on jforum.net by abdujaparov]
|
 |
Migrated From Jforum.net
Ranch Hand
Joined: Apr 22, 2012
Posts: 17424
|
|
For testing and portability jForum uses it's own interface (RequestContext). This allows for some jforum code to be tested outside of the web server environment.
However, in the web environment, the class that implements this interface in the web environment is just a HTTPServletRequest wrapper. This mean you can cast the RequestContext object as a HTTPServletRequest class and get all the methods. [originally posted on jforum.net by monroe]
|
 |
Migrated From Jforum.net
Ranch Hand
Joined: Apr 22, 2012
Posts: 17424
|
|
hi, abdujaparov
Where you put this code? :idea: [originally posted on jforum.net by Carlos_ds_jar]
|
 |
 |
|
|
subject: File upload
|
|
|