Fossil SCM

Show the size of the file in the /file display of audio/* files.

drh 2021-01-04 12:14 trunk
Commit dff1332593869ff5b21c2add728363afe91c50a747ef54b716fe89a8d50152b2
1 file changed +1
+1
--- src/info.c
+++ src/info.c
@@ -2535,10 +2535,11 @@
25352535
}else if( strncmp(zMime, "image/", 6)==0 ){
25362536
@ <p>(file is %d(blob_size(&content)) bytes of image data)</i></p>
25372537
@ <p><img src="%R/raw/%s(zUuid)?m=%s(zMime)"></p>
25382538
style_submenu_element("Image", "%R/raw/%s?m=%s", zUuid, zMime);
25392539
}else if( strncmp(zMime, "audio/", 6)==0 ){
2540
+ @ <p>(file is %d(blob_size(&content)) bytes of sound data)</i></p>
25402541
@ <audio controls src="%R/raw/%s(zUuid)?m=%s(zMime)">
25412542
@ (Not supported by this browser)
25422543
@ </audio>
25432544
}else{
25442545
@ <i>(file is %d(blob_size(&content)) bytes of binary data)</i>
25452546
--- src/info.c
+++ src/info.c
@@ -2535,10 +2535,11 @@
2535 }else if( strncmp(zMime, "image/", 6)==0 ){
2536 @ <p>(file is %d(blob_size(&content)) bytes of image data)</i></p>
2537 @ <p><img src="%R/raw/%s(zUuid)?m=%s(zMime)"></p>
2538 style_submenu_element("Image", "%R/raw/%s?m=%s", zUuid, zMime);
2539 }else if( strncmp(zMime, "audio/", 6)==0 ){
 
2540 @ <audio controls src="%R/raw/%s(zUuid)?m=%s(zMime)">
2541 @ (Not supported by this browser)
2542 @ </audio>
2543 }else{
2544 @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i>
2545
--- src/info.c
+++ src/info.c
@@ -2535,10 +2535,11 @@
2535 }else if( strncmp(zMime, "image/", 6)==0 ){
2536 @ <p>(file is %d(blob_size(&content)) bytes of image data)</i></p>
2537 @ <p><img src="%R/raw/%s(zUuid)?m=%s(zMime)"></p>
2538 style_submenu_element("Image", "%R/raw/%s?m=%s", zUuid, zMime);
2539 }else if( strncmp(zMime, "audio/", 6)==0 ){
2540 @ <p>(file is %d(blob_size(&content)) bytes of sound data)</i></p>
2541 @ <audio controls src="%R/raw/%s(zUuid)?m=%s(zMime)">
2542 @ (Not supported by this browser)
2543 @ </audio>
2544 }else{
2545 @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i>
2546

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button