comparison libervia/pages/photos/new/page_meta.py @ 1280:198605982d15

pages (photos/new): create albums in "/albums/" path in default namespace
author Goffi <goffi@goffi.org>
date Fri, 19 Jun 2020 16:47:50 +0200
parents 4385a75e3962
children 3a1cb3c5702f
comparison
equal deleted inserted replaced
1279:2d1ceb026d0e 1280:198605982d15
15 15
16 16
17 async def on_data_post(self, request): 17 async def on_data_post(self, request):
18 request_data = self.getRData(request) 18 request_data = self.getRData(request)
19 profile = self.getProfile(request) 19 profile = self.getProfile(request)
20 name = self.getPostedData(request, "name") 20 name = self.getPostedData(request, "name").replace('/', '_')
21 if profile is None: 21 if profile is None:
22 self.pageError(request, C.HTTP_BAD_REQUEST) 22 self.pageError(request, C.HTTP_BAD_REQUEST)
23 fis_ns = self.host.ns_map["fis"] 23 fis_ns = self.host.ns_map["fis"]
24 http_upload_ns = self.host.ns_map["http_upload"] 24 http_upload_ns = self.host.ns_map["http_upload"]
25 entities_services, __, __ = await self.host.bridgeCall( 25 entities_services, __, __ = await self.host.bridgeCall(
42 42
43 await self.host.bridgeCall( 43 await self.host.bridgeCall(
44 "interestsRegisterFileSharing", 44 "interestsRegisterFileSharing",
45 fis_service, 45 fis_service,
46 "photos", 46 "photos",
47 f"photo-album:{name}",
48 "", 47 "",
48 f"/albums/{name}",
49 name, 49 name,
50 "", 50 "",
51 profile 51 profile
52 ) 52 )
53 log.info(f"album {name} created") 53 log.info(f"album {name} created")