Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - danny

Pages: [1] 2 3 ... 8
1
HTML & templates / Re: Responsive small screen template
« on: August 20, 2019, 05:44:02 PM »
@DJ
I need some help with a modification of search results.
Code: [Select]
<script type="text/javascript">function searchQuery() {frm = document.searchForm;if(frm.query.value.length < 3) {alert("Search requires 3 or more characters");} else {frm.recursive.checked ? recursive ="&recursive" : recursive ="";for(x=0; x<frm.choice.length; x++) {if(frm.choice[x].checked ==1) {if(frm.choice[x].value =="file") {searchMode ="?files-filter=";filter="&folders-filter=%5C";} else if(frm.choice[x].value =="folder") {searchMode ="?folders-filter=";filter="&files-filter=%5C";} else {searchMode ="?filter=";filter="";}}}for(c=0; c<frm.root.length; c++) {if(frm.root[c].checked ==1) {frm.root[c].value =="current" ? searchFrom ="http://%host%%folder%": searchFrom = "http://%host%";}}document.location.href = searchFrom+searchMode+"*"+frm.query.value+"*"+recursive+filter;}}</script>The modification that I need is:  If no file found, refresh to ordinary list in 1 second or less.  Or, prompt 'not found', without changing/doing any file list.

Purpose:  I want to put a Folder Delete function in the [nofiles] section, because I think it fine to delete empty folders.  However, this is not quite safe because negative search results also lands on the nofiles page, and thus user might think there are no files, but there is a surprise instead.

2
HTML & templates / Use
« on: August 20, 2019, 09:35:29 AM »
Let me know how you like it!  And, how you use it (scenario, speeds, #users)?   


3
This particular HFS forum is for:
Http File Server, HFS
Not
High-performance File System, HFS+

In fact,
Http File Server runs on Windows/Wine and can use Fat32, exFAT and NTFS file systems.
It is not compatible with the Circa 1998 Apple Macintosh HFS+ file system; so, that is not successful.  However, Fat32 and exFAT are cross compatible and should work.  Use Fat32 for small disks or exFAT for large disks.  Format on the PC, and then they will work for both PC and Apple.   
https://en.wikipedia.org/wiki/File_system#exFAT
https://en.wikipedia.org/wiki/HTTP_File_Server


5
HFS ~ HTTP File Server / Re: Backup
« on: August 16, 2019, 12:47:47 PM »
The following is the batch file (bakup.bat) from my backup server. 
There are 3 ordinary SMB1 shares on the main server.  And, those get synchronized to folders, at the backup server. 
Synchronizing provides no protection against deleted/damaged/bitrot file, because that will be synchronized onto the backup, replacing the good file with the new, because that's what sync should do.  So, consider adding an additional set of drives that will be copied infrequently, not synced frequently.  Yes, you need more than 1 backup. 

For reliable sync, this example has been written to survive bad connections, because my own backup appliance tends to power-save its network card; and, likewise, this example will work nicely over wifi too. 

@echo off
verify on
:ONE
VER > nul
robocopy \\server\share1\ G:\folder1\ /e /copy:DT /xo /purge /w:0 /r:0
IF %ERRORLEVEL% NEQ 0 GOTO ONE
:TWO
VER > nul
robocopy \\server\share2\ G:\folder2\ /e /copy:DT /xo /purge /nfl /w:0 /r:0
IF %ERRORLEVEL% NEQ 0 GOTO TWO
:THREE
VER > nul
robocopy \\server\share3\ G:\folder3\ /e /copy:DT /xo /purge /nfl /w:0 /r:0
IF %ERRORLEVEL% NEQ 0 GOTO THREE


After that, I used Task Scheduler to make this batch file a startup task,
then I set the Bios to automatically power on. 
The end of my batch file runs the shutdown command. 

Alternatively, it is possible to synchronize over FTP.
And, it is possible to synchronize from HFS:  https://en.wikipedia.org/wiki/Offline_reader#Website-mirroring_software

6
HTML & templates / Re: Video player to watch with friends.
« on: August 10, 2019, 01:42:18 PM »
Is there a way to get HEVC, X265 playing? 

7
No hung requests with:
HFS 2.4rc2:  http://www.rejetto.com/hfsfiles/hfs24rc2.exe
HFS 2.3K:  https://drive.google.com/open?id=1TVfCfxygKXShEIZT9cnumO_jX_9Ssefy

However, HFS 2.3M gets absolutely knackered during concurrency testing.  Just choose a different version. 

8
HTML & templates / Early release of Throwback12
« on: August 06, 2019, 02:55:00 PM »
It has dynamic archive and upload, low ram consumption and high reliability. In testing, it can do quarter-million file list, while hauling many photos and playing mp3s.

Changelog/edits:
I made a better dynamic module for MP and basic, so they'd have the same high load protection as the photo version.  This was well tested and then uploaded to post#1. 

Also, use one of these:
HFS 2.4rc2:  http://www.rejetto.com/hfsfiles/hfs24rc2.exe
HFS 2.3K:  https://drive.google.com/open?id=1TVfCfxygKXShEIZT9cnumO_jX_9Ssefy

I changed the marquee for Throwback12 to 'HTTP File Server'  to make the purpose clear.
It is also a load indicator:
Green HTTP File Server marquee = light load & happy server
Orange HTTP File Server marquee = overload prevention engaged
And with this minor change, Throwback12 has been re-uploaded to post#1

9
HTML & templates / Re: Responsive small screen template
« on: August 03, 2019, 06:11:06 AM »
DJ,
I was wondering how to add mp3 play function to a many file icons, such as 🔊 after the %list% finished drawing? 

Edit: Oh my gosh.  LOLZ!!!  Yes, it does already exist.  Thank you!

10
Howabout this way, with %encoded-folder% as the destination?  Better security.
Code: [Select]
<center><form method='post'>Paste a URL: <input name='url' value=""><input type='hidden' name='dest' value=""><br><input type='submit' value='Transfer'></form>
{.set|url|{.postvar|url.}.}
{.break|if={.count substring|\|{.decodeuri|{.^url.}.}.}|result=Direct access on hard disk not allowed.}
{.set|dest|%encoded-folder%{.or|{.filename|{.postvar|dest.}.}|{.filename|{.^url.}.}.}.}
{.set|filesize|{.filesize|{.^url.}.}.}
{.if|{.match|^ftp?://|{.^url.}.}| {:{.set|from|{.^filesize.}.}:} | {:{.delete|{.^dest.}|bin=0.}{.set|from|0.}:}.}
{.break|if={.not|{.^filesize.}.}{.=|{.^filesize.}|{.filesize|{.^dest.}.}.}.}
{.save|{.^dest.}|.}
{.^from.}
{.comment| define CHUNK with the min size, if nul then WHILE is never executed.}
{.set|chunk|{.min|{.^filesize.}|10000000.}.}
{.^chunk.}
{.while|chunk|{:
 {.add to log|loading {.^chunk.} bytes.}
   {.load|{.^url.}|from={.^from.}|var=data|size={.^chunk.}.}
   {.length|var=data.}
   {.add to log|Download: from={.^from.} request={.^chunk.}  loaded= {.length|var=data.}.}
   {.if|{.length|var=data.}
      |   {:
         {.add to log|saving.}
         {.append|{.^dest.}|var=data.}{.inc|from|{.length|var=data.}.}
         {.comment| redefine CHUNK with the min size, if nul then WHILE is stoped.}
         {.set|chunk|{.min|{.^chunk.}|{.sub|{.^filesize.}|{.^from.}/sub.}.}.}
         :}
      |   {:
         {.set|chunk|0.}
         {.if|{.and| {.not|{.match|^ftp?://|{.^url.}.}/not.} | {.not|{.^filesize.} = {.filesize|{.^dest.}.}/not.}   /and.}
            |{:{.delete|{.^dest.}|bin=0.}:}.}
         {.add to log|End of download.}:}/if.}:}|timeout=0.}</center>

Perhaps we should filter out:
index.htm*
default.htm*
descript.ion
hfs.*

Are there more that should be filtered out?  Is THIS the right way to do it?
{.break|if={.count substring|index.htm|{.decodeuri|{.^url.}.}.}|result=filetype not allowed.}
{.break|if={.count substring|default.htm|{.decodeuri|{.^url.}.}.}|result=filetype not allowed.}
{.break|if={.count substring|descript.ion|{.decodeuri|{.^url.}.}.}|result=filetype not allowed.}
{.break|if={.count substring|hfs.|{.decodeuri|{.^url.}.}.}|result=filetype not allowed.}

P.S.  What modification to get it to work with https:// url's? If going without, then usefulness does seem near-absent, since the majority of sites are https.
if reMatch(fn, '^https?://', 'i!') > 0 then
    try result:=httpGet(fn, from, size)
Where does that part go?

11
... I created the file and pasted it 
[+download]
{.set speed limit for connection | 625.}
The  hfs.events  file goes in the same folder as hfs.exe--from the keyboard, you can do Alt+F6

Also set downloads per ip to 3
Also set connections per ip to 4
And, turn off speed limit; turn off speed limit per ip, because speed limit is vulnerable to download manager attack. 

Other things to try. 
HFS 2.3k https://drive.google.com/open?id=1TVfCfxygKXShEIZT9cnumO_jX_9Ssefy
And you can try the basic or mp versions of the throwback template.

If none of this suits, you can use TightVNC or other popular remote control software.

12
...Speed Limit...crashes...
Options:
Remove the speed limit.
and
There's a different option (tested only slightly): 
in hfs.events file
[+download]
{.set speed limit for connection | 625.}

That should, probably, prevent one thing from getting stuck behind another; and, 4 downloads * 625 is perhaps your 2500. 

Alternatively, put speed limit in a different box: https://www.linksysinfo.org/index.php?forums/tomato-firmware.33/  You can add the five rule auto qos, and then speed is adaptive. 
...Is it possible to restart the program remotely?...
Options:
hfs.events file
[at 4:00]
{.stop server.}
[at 4:01]
{.start server.}

Alternatively, https://www.tightvnc.com/ although, long un~spel1abla password, and do change the default VNC port number, to something less inviting, such as, an  Unassigned  port from this list: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt

13
HTML & templates / icons
« on: July 27, 2019, 04:30:38 AM »
I got to use it today, and it is awesome! 

The main performance issue is the icons within the exe, carried over from the previous standard template.  However, using your new font/unicode icons in the file %list% will fix it. 
Like: 
{.set ini|use-system-icons=no.} And, then use your new font/unicode icons in the %list%.  I ran tests with the exe-icons off, and found the speed improved.   

14
Beta / Re: version 2.4
« on: July 26, 2019, 09:22:00 AM »
Quote from: bmartino1
The main idea is adding "a cookie-based login system", so modern mobile browsers could use a form based login system (and not rely on that old and obsolete login popup that most new browsers are now deprecating).
such thing was actually ongoing years ago, then with the hiatus i've lost track of the progress....
  Location of some of the login materials:
http://rejetto.com/forum/index.php?topic=13054.0 The script works for current folder, but doesn't stay logged in.
http://rejetto.com/forum/index.php?topic=13062.0

15
@ bmartino1,
Thanks.  Yes: first post, this same thread.  My signature line has the link.

I put the finished works at post#1 to keep them separate from developmental efforts.

Pages: [1] 2 3 ... 8