Hello everyone,
All of my generated PDF files and user's attachments (doc, png etc.) are currently saved under the server folder. I am trying to move everything to another drive (etc..d drive) and my website should be able to read files from the new location.
Is there a way to do this?
Please advise.
Thank you so much.
regards,
Edwina
save/open file from other drive
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 24
- Joined: Fri Nov 04, 2016 7:41 pm
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
You can always copy or move the files to a different location using
to copy or
to move the file(s).
When you say you that your site should read the files, do you mean that you want to create a hyperlink to the files or do you want to open the files and read the contents ? I don't think you can hyperlink to a location outside of your web server if that's what you're trying to do but you should be able to read the files using the Java File I/O libraries.
Code: Select all
FileServices.copyFile(fromPath, toPath)
Code: Select all
FileServices.moveFile(fromPath, toPath)
When you say you that your site should read the files, do you mean that you want to create a hyperlink to the files or do you want to open the files and read the contents ? I don't think you can hyperlink to a location outside of your web server if that's what you're trying to do but you should be able to read the files using the Java File I/O libraries.
0 x
-
- Ebase User
- Posts: 24
- Joined: Fri Nov 04, 2016 7:41 pm
Hello Segi,
Currently, I am using to display my file content, so after the user clicks the hyperlink, the content (picture, text, pdf) will get displayed.
After moving the files outside the web server folder, I realized I can't do this anymore...
regards,
Edwina
Currently, I am using
Code: Select all
form.displayUrl();
After moving the files outside the web server folder, I realized I can't do this anymore...
regards,
Edwina
0 x
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Hi, we created a files / document repository under Tomcat.
That way you can save the files outside of Ebase but still be able to refer to them within Tomcat eg http://server.domain.com/documentrepository/thefile.pdf
See https://tomcat.apache.org/tomcat-8.0-do ... ntext.html and search for docBase.
Code: Select all
<Context path="/documentrepository" docBase="D:/EbaseDocRepository/DEV/" />
See https://tomcat.apache.org/tomcat-8.0-do ... ntext.html and search for docBase.
0 x
-
- Ebase User
- Posts: 24
- Joined: Fri Nov 04, 2016 7:41 pm
Thanks, Steve,
I got this worked by using servlet.
http://forum.ebasetech.com/forum/viewto ... ingcontent
I will try your suggestion next.
regards,
Edwina
I got this worked by using servlet.
http://forum.ebasetech.com/forum/viewto ... ingcontent
I will try your suggestion next.
regards,
Edwina
0 x
-
- Ebase User
- Posts: 24
- Joined: Fri Nov 04, 2016 7:41 pm
Hello Steve,
We added the code as you suggested under tomcat\conf\Server.xml on our training server, and it worked perfectly, but is there a way to add it to our integration server?
I think the Server.xml is missing in the local integration server folder, where should we add the context code?
thanks,
Edwina
We added the code as you suggested under tomcat\conf\Server.xml on our training server, and it worked perfectly, but is there a way to add it to our integration server?
I think the Server.xml is missing in the local integration server folder, where should we add the context code?
thanks,
Edwina
0 x
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Hi Edwina, I do not use the integrated server as it is not full blown Tomcat. I've no idea I'm afraid.
I develop forms in the Designer that points to a server installation of Tomcat.
Ugly but you could have a configuration file that points to the appropriate server based on environment.
Thanks
Steve
I develop forms in the Designer that points to a server installation of Tomcat.
Ugly but you could have a configuration file that points to the appropriate server based on environment.
Thanks
Steve
0 x
-
- Moderator
- Posts: 416
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Who is online
Users browsing this forum: No registered users and 7 guests