diff 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
line wrap: on
line diff
--- a/libervia/pages/photos/new/page_meta.py	Fri Jun 19 16:47:50 2020 +0200
+++ b/libervia/pages/photos/new/page_meta.py	Fri Jun 19 16:47:50 2020 +0200
@@ -17,7 +17,7 @@
 async def on_data_post(self, request):
     request_data = self.getRData(request)
     profile = self.getProfile(request)
-    name = self.getPostedData(request, "name")
+    name = self.getPostedData(request, "name").replace('/', '_')
     if profile is None:
         self.pageError(request, C.HTTP_BAD_REQUEST)
     fis_ns = self.host.ns_map["fis"]
@@ -44,8 +44,8 @@
         "interestsRegisterFileSharing",
         fis_service,
         "photos",
-        f"photo-album:{name}",
         "",
+        f"/albums/{name}",
         name,
         "",
         profile