VIVO-848 Move the FileStorage system behind an interface
Add it to the Application framework, and do some cleanup.
This commit is contained in:
parent
5f5a02ce5d
commit
bb7ab3b2a3
2 changed files with 3 additions and 6 deletions
|
@ -41,7 +41,7 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
|||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ExceptionResponseValues;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||
import edu.cornell.mannlib.vitro.webapp.filestorage.backend.FileStorageSetup;
|
||||
import edu.cornell.mannlib.vitro.webapp.filestorage.impl.FileStorageImplWrapper;
|
||||
|
||||
public class FileHarvestController extends FreemarkerHttpServlet {
|
||||
|
||||
|
@ -213,12 +213,12 @@ public class FileHarvestController extends FreemarkerHttpServlet {
|
|||
*/
|
||||
private static String getUploadPathBase(ServletContext context) throws Exception
|
||||
{
|
||||
String vitroHomeDirectoryName = ConfigurationProperties.getBean(context).getProperty(FileStorageSetup.PROPERTY_VITRO_HOME_DIR);
|
||||
String vitroHomeDirectoryName = ConfigurationProperties.getBean(context).getProperty(FileStorageImplWrapper.PROPERTY_VITRO_HOME_DIR);
|
||||
if (vitroHomeDirectoryName == null) {
|
||||
throw new Exception("Vitro home directory name could not be found.");
|
||||
}
|
||||
|
||||
String pathBase = vitroHomeDirectoryName + "/" + FileStorageSetup.FILE_STORAGE_SUBDIRECTORY + "/" + PATH_TO_UPLOADS;
|
||||
String pathBase = vitroHomeDirectoryName + "/" + FileStorageImplWrapper.FILE_STORAGE_SUBDIRECTORY + "/" + PATH_TO_UPLOADS;
|
||||
return pathBase;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue