rejetto forum

Recent Posts

11
It works:
Code: [Select]
[+]
{.if|{.!=|%ip%|127.0.0.1.}|{:{.disconnect.}:}.}
12
Programmers corner / Re: Template/events for QOS or traffic shaping.
« Last post by danny on April 28, 2021, 02:23:15 PM »
@Mars
For QOS purpose, I had few questions...

Are there some per ip-specific measurements?
How to make global variable apply to only 1 ip? 

something like these:?
connections_this_ip
active_downloads_this_ip
set or get #^flag_this_ip

Some templates have extra features (such as thumbnails) that are not good in high-load conditions.  It is good to make a bypass macro to temporarily streamline the template (without extras) to lighten the load.  If global measure is used for traffic shaping, then 1 miscreant affects everyone (this is anti-QOS); so, for QOS function, it may be better if feature-bypass macro targeted the specific overdoing IP address. 
I don't know; but, if the per-ip measures are available, then I could test it. 
13
Right click on your folder, select "Properties...", then go to "Diff template" tab, put in these:
Code: [Select]
[^]
{.if|{.!=|%ip%|192.168.2.149.}|
{:{.disconnect.}:}
.}
(replace the ip to yours)

Push OK then it works ;)
14
HFS ~ HTTP File Server / Any way to limit viewing a folder/file from one specific IP?
« Last post by Tsuna on April 28, 2021, 01:52:15 PM »
Using the latest dev version and having a roadblock where I want to limit a folder such that only a specific IP can view it/access it
But unable to find anything like this in the docs or on the forum

I think it may be possible via a script for that folder? Looking for some guidance on the same
15
Programmers corner / Re: Template/events for QOS or traffic shaping.
« Last post by danny on April 25, 2021, 05:48:20 AM »
How do you like it?
Code: [Select]
[not found]
{.add header|Cache-Control: no-cache, max-age=0.}{.if|{.=|{.cut|-1||%url%.}|/.}
|{:{.redirect|../.}:}
|{:{.redirect|/~404?path={.encodeuri|{.filepath|%url%.}.}.}:}.}
[404|public]
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<META HTTP-EQUIV="Refresh" CONTENT="1;URL={.decodeuri|{.urlvar|path.}.}"><TITLE>404</TITLE><link rel="icon" href="data:,">
</head><body><center><h2><br>File Not Found.</h2>Returning to previous page...</center></body></html>
For missing Folder, a valid folder is quickly found.  (the user is not lost)
For missing File, right-click+save-as does Not generate a corrupt file. (browser has 404.htm)

A complete set of quality-control error pages, can be found in the Throwback and Stripes templates. 
Thanks to Mars and Naitlee
16
HTML & templates / The Throwback template. Updated!
« Last post by danny on April 23, 2021, 02:04:48 PM »
The new files are available at Post#1
(previous version was put into historic.zip)

For Throwback14v6:
+ Icon update so that the features are easier
+ New error-redirection pages for file integrity
+ HFS2.4 version login gets the right target
+ More responsive on phone/tablet screens
+ Photoviewer/slideshow has image file name
+ Musicplayer: mp3, m4a, ogg, aac, wma, flac
+ More ondemand & Less RQ load = even faster
+ Compressed javascript for some data savings
+ Navigation caching for HFS2.3 and HFS2.4 too 

Do feel free to comment...
17
HFS ~ HTTP File Server / Re: Any way to load windows embedded thubnails?
« Last post by w1p30ut3r on April 16, 2021, 04:43:41 PM »
review
create thumbs on upload only with javascript (add thumbsize=128, doesn't work with psd files)

Exactly, the icon must be loading from the thumbnail generated by windows... :'(... I use sagethumbs that save the icon in the files (or in the windows database)... The problem is it... The template must load the icon too... :'(
18
HFS ~ HTTP File Server / Re: Any way to load windows embedded thubnails?
« Last post by dj on April 16, 2021, 10:16:20 AM »
So I'm working on a minimize template that works with thumbnail generating with FFmpeg.

review
create thumbs on upload only with javascript (add thumbsize=128, doesn't work with psd files)


update:
you can try to show build-in thumbnails (normally for jpeg)
19
HFS ~ HTTP File Server / Re: Any way to load windows embedded thubnails?
« Last post by NaitLee on April 16, 2021, 08:03:54 AM »
I've tried, FFmpeg (Windows) can convert PSD to PNG or other formats, then can be used as thumbnails.
You may download it first, to use later.

FFmpeg for GNU/Linux

In my region I can't access your site. So I'm working on a minimize template that works with thumbnail generating with FFmpeg.

Edit: it's done. see attachment.

To use:
- Put ffmpeg.exe into folder of hfs.exe
- switch template to designers-joy.tpl
- go to http://localhost:port/~manager.html, input 1 in apikey, hit "generate thumbs" and wait for a while
- when below shows text, it's done. when you back to filelist, there are thumbs on filenames
- Edit the template file, change apikey and resolution(W) if you want ;)

Note: This template have no additional features like login or upload. For more help please ask :D

Tip: While using this tpl, only put a folder that contains picture files. FFmpeg will try to convert everything so be cautious
20
HTML & templates / Re: HTML5 media playback instead of Flash in RAWR Live theme
« Last post by danny on April 16, 2021, 07:56:14 AM »
... it's always much better to attach files here than hosting on external links (since an external file can expire or be removed by external factors).
So, true!  Another lost external link is bmartino1's updates to the Live theme.