|
37 | 37 | import act.controller.bytecode.ControllerByteCodeScanner; |
38 | 38 | import act.data.DataPropertyRepository; |
39 | 39 | import act.data.JodaDateTimeCodec; |
| 40 | +import act.util.UploadFileStorageService; |
40 | 41 | import act.data.util.ActPropertyHandlerFactory; |
41 | 42 | import act.event.AppEventListenerBase; |
42 | 43 | import act.event.EventBus; |
|
76 | 77 | import org.osgl.logging.Logger; |
77 | 78 | import org.osgl.mvc.MvcConfig; |
78 | 79 | import org.osgl.mvc.result.Result; |
79 | | -import org.osgl.storage.IStorageService; |
80 | 80 | import org.osgl.util.*; |
81 | 81 | import org.rythmengine.utils.I18N; |
82 | 82 |
|
@@ -136,7 +136,7 @@ public enum F { |
136 | 136 | private BinderManager binderManager; |
137 | 137 | private AppInterceptorManager interceptorManager; |
138 | 138 | private DependencyInjector<?> dependencyInjector; |
139 | | - private IStorageService uploadFileStorageService; |
| 139 | + private UploadFileStorageService uploadFileStorageService; |
140 | 140 | private AppServiceRegistry appServiceRegistry; |
141 | 141 | private Map<String, Daemon> daemonRegistry; |
142 | 142 | private WebSocketConnectionManager webSocketConnectionManager; |
@@ -810,7 +810,7 @@ public <DI extends DependencyInjector> DI injector() { |
810 | 810 | return (DI) dependencyInjector; |
811 | 811 | } |
812 | 812 |
|
813 | | - public IStorageService uploadFileStorageService() { |
| 813 | + public UploadFileStorageService uploadFileStorageService() { |
814 | 814 | return uploadFileStorageService; |
815 | 815 | } |
816 | 816 |
|
@@ -1242,10 +1242,10 @@ private void loadRoutes() { |
1242 | 1242 |
|
1243 | 1243 | private void loadBuiltInRoutes() { |
1244 | 1244 | router().addMapping(H.Method.GET, "/asset/", new StaticResourceGetter("asset"), RouteSource.BUILD_IN); |
1245 | | - router().addMapping(H.Method.GET, "/asset/act/", new StaticResourceGetter("asset/act"), RouteSource.BUILD_IN); |
1246 | | - if (config().allowDownloadUploadFile()) { |
1247 | | - router().addMapping(H.Method.GET, "/~upload/{path}", new UploadFileStorageService.UploadFileGetter(), RouteSource.BUILD_IN); |
1248 | | - } |
| 1245 | + StaticResourceGetter actAssets = new StaticResourceGetter("asset/~/act"); |
| 1246 | + router().addMapping(H.Method.GET, "/~/asset/", actAssets, RouteSource.BUILD_IN); |
| 1247 | + // TODO drop the following routes in 2.0 |
| 1248 | + router().addMapping(H.Method.GET, "/asset/act/", actAssets, RouteSource.BUILD_IN); |
1249 | 1249 | router().addContext("act.", "/~"); |
1250 | 1250 | if (config.cliOverHttp()) { |
1251 | 1251 | Router router = router(AppConfig.PORT_CLI_OVER_HTTP); |
|
0 commit comments