Browse Source

Reintroduce X-Sendfile; Update TODO

pull/39/head
Dashie der otter 2 months ago
parent
commit
336f680d12
Signed by: Dashie <dashie@sigpipe.me> GPG Key ID: C2D57B325840B755
3 changed files with 4 additions and 9 deletions
  1. 0
    5
      TODO.org
  2. 2
    2
      app.py
  3. 2
    2
      docs/reel2bits.nginx

+ 0
- 5
TODO.org View File

@@ -20,19 +20,14 @@
20 20
 -> profile UPDATE not handled yet (littleboxes don't handle UPDATE) upstream
21 21
 
22 22
 ~~~~~~~~~ VARIOUS ~~~~~~~~~~~~
23
-Only show to public processed songs
24 23
 Also do not show player until processing is done, and waveform done
25 24
 
26
-X-Accel-Redirect have not been implemented again
27
-    not sure it would be useful ?
28
-
29 25
 Check for sentry in:
30 26
  - waitress (web)
31 27
  - celery (workers)
32 28
 
33 29
 Slugs : BEFORE, and UNIQUE; Some things weird on that side IIRC
34 30
 Emails notifications (register, password changed, track ready)
35
-Album selector in new upload -> Add first element empty "No album"
36 31
 
37 32
 Celery things to add in web interface:
38 33
   - log user

+ 2
- 2
app.py View File

@@ -221,7 +221,7 @@ def create_app(config_filename="config.py", app_name=None, register_blueprints=T
221 221
 
222 222
     @app.route("/uploads/<string:thing>/<path:stuff>", methods=["GET"])
223 223
     def get_uploads_stuff(thing, stuff):
224
-        if app.debug:
224
+        if app.testing:
225 225
             directory = safe_join(app.config["UPLOADS_DEFAULT_DEST"], thing)
226 226
             app.logger.debug(f"serving {stuff} from {directory}")
227 227
             return send_from_directory(directory, stuff, as_attachment=True)
@@ -229,7 +229,7 @@ def create_app(config_filename="config.py", app_name=None, register_blueprints=T
229 229
             app.logger.debug(f"X-Accel-Redirect serving {stuff}")
230 230
             resp = Response("")
231 231
             resp.headers["Content-Disposition"] = f"attachment; filename={stuff}"
232
-            resp.headers["X-Accel-Redirect"] = f"/_protected/media/tracks/{thing}/{stuff}"
232
+            resp.headers["X-Accel-Redirect"] = f"/_protected/media/{thing}/{stuff}"
233 233
             return resp
234 234
 
235 235
     @app.errorhandler(404)

+ 2
- 2
docs/reel2bits.nginx View File

@@ -21,12 +21,12 @@ server {
21 21
             proxy_pass http://127.0.0.1:8000;
22 22
         }
23 23
 
24
-        location /uploads/sounds {
24
+        location /_protected/media/sounds {
25 25
                 # Same path as UPLOADS_DEFAULT_DEST in config.py but with /sounds
26 26
                 alias /home/reel2bits/uploads/sounds;
27 27
         }
28 28
 
29
-        location /uploads/waveforms {
29
+        location /_protected/media/waveforms {
30 30
                 # Same path as UPLOADS_DEFAULT_DEST in config.py but with /waveforms
31 31
                 alias /home/reel2bits/uploads/waveforms;
32 32
         }

Loading…
Cancel
Save