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
HTML & templates / Re: Responsive small screen template
« on: August 20, 2019, 05:44:02 PM »
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.

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)?   

This particular HFS forum is for:
Http File Server, HFS
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.

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
VER > nul
robocopy \\server\share1\ G:\folder1\ /e /copy:DT /xo /purge /w:0 /r:0
VER > nul
robocopy \\server\share2\ G:\folder2\ /e /copy:DT /xo /purge /nfl /w:0 /r:0
VER > nul
robocopy \\server\share3\ G:\folder3\ /e /copy:DT /xo /purge /nfl /w:0 /r:0

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:

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? 

No hung requests with:
HFS 2.4rc2:
HFS 2.3K:

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

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.

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:
HFS 2.3K:

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

HTML & templates / Re: Responsive small screen template
« on: August 03, 2019, 06:11:06 AM »
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!

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>
{.break|if={.count substring|\|{.decodeuri|{.^url.}.}.}|result=Direct access on hard disk not allowed.}
{.if|{.match|^ftp?://|{.^url.}.}| {:{.set|from|{.^filesize.}.}:} | {:{.delete|{.^dest.}|bin=0.}{.set|from|0.}:}.}
{.comment| define CHUNK with the min size, if nul then WHILE is never executed.}
 {.add to log|loading {.^chunk.} bytes.}
   {.add to log|Download: from={.^from.} request={.^chunk.}  loaded= {.length|var=data.}.}
      |   {:
         {.add to log|saving.}
         {.comment| redefine CHUNK with the min size, if nul then WHILE is stoped.}
      |   {:
         {.if|{.and| {.not|{.match|^ftp?://|{.^url.}.}/not.} | {.not|{.^filesize.} = {.filesize|{.^dest.}.}/not.}   /and.}
         {.add to log|End of download.}:}/if.}:}|timeout=0.}</center>

Perhaps we should filter out:

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?

... I created the file and pasted it 
{.set speed limit for connection | 625.}
The  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
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.

...Speed Limit...crashes...
Remove the speed limit.
There's a different option (tested only slightly): 
in file
{.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:  You can add the five rule auto qos, and then speed is adaptive. 
...Is it possible to restart the program remotely?...
Options: file
[at 4:00]
{.stop server.}
[at 4:01]
{.start server.}

Alternatively, 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:

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. 
{.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.   

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: The script works for current folder, but doesn't stay logged in.

@ 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