Recent Posts

Pages: 1 2 [3] 4 5 ... 10
Bug reports / HFS Documentation (English)
« Last post by dj on July 10, 2018, 01:00:38 AM »
HTML & templates / Re: Need help with file delete feature
« Last post by dj on July 09, 2018, 12:27:37 PM »
Code: [Select]
{.if|{.get|can delete.}|<span onclick='del("%item-url%")'>x</span>.}
and add script
Code: [Select]
function del(it) {
if(!confirm("Delete "+it+"?")) return 0;
var xhr = new XMLHttpRequest();"POST", "%folder%")
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
xhr.onload = function() {document.write(xhr.responseText);}

tested with chrome,FF,Edge

Update: more elegant

Code: [Select]
{.if|{.get|can delete.}|<span class='del' data-it='%item-url%'>x</span>.}
and add script at the end
Code: [Select]
document.querySelectorAll('.del').forEach(function(userItem) {

or use a single event handler

Update2: if {.get|can delete.} slowes down, you can try

Code: [Select]
<span class='del' data-it='%item-url%'>x</span>
and add to function del
Code: [Select]
if (!'{.get|can delete.}') return 0
Я использовал NOIP. С полгода всё работало, потом опять та же песня. Взял в Ростелекоме статический айпи- помогло.
HTML & templates / Re: Chat for HFS.
« Last post by username1565 on July 08, 2018, 07:21:42 AM »
Also, I want to recommend you all to see this:

This is web-based interface for Tox!
Here is source code: and there is server-side code, writed as .go files.
This must to be compiled and this is a different server.
GO-installer have over 100 MB size. Not good for downloading.

Utox, Toxcore, or
this all is a P2P-programs, yes this can working in LAN,
and there is, inside the p2p tox-programs, already exists server-side soft.
But tox-programs is not web-based chat. So, webTox can make this web-based.

In this case, compiled go-files code in server-side of webtox
can be included in HFS server code, and working if tox-node will be running.
But I think this will make more sence, if WebTox will be included in server-side code for tox-programs.

So I just leave this here, and you can learn Tox working principles
and include something of this in HFS.
For example, NaCl encryption, with generate private key and public key,
or DHT to make peer exchange - all this can be inside HFS.
HTML & templates / Re: Chat for HFS.
« Last post by username1565 on July 08, 2018, 07:10:36 AM »
Also, as example, I can leave here this chat:
If two tabs with this, in browser, will be opened together, you can chat with yourself.
This chat not a p2p, and this need to register room or channel on the site pubnub.
But I think traffic will go between peers, and the channel don't save the traffic.
I think this, because reloading the page not give all previous messages.
In this case pubnub channel working as relay server or stun server for peer exchange and then chat is really P2P.
This can working in LAN if stun server or relay server will be inside HFS.

Also, I want to recommend you all to test this WebRTC-examples:
There is examples for file-sharing, voice chat, and webcam-chat,
but this not a p2p, not working in LAN without Interned,
and this all working with requirements for runing server-side code,
and need, or Peer.js to be runned on node.js.
Node.js source code is to large to be included in HFS server but maybe can using
minify and compactly implementation for requirements only this all.
HTML & templates / Re: Chat for HFS.
« Last post by username1565 on July 08, 2018, 06:56:47 AM »
Maybe there is possible to add websockets, or another methods, like WebRTC.
Maybe there is possible to add file sharing, webcam-streaming, or voice chat.
In this case, HFS can working just as relay-server (like IRC), or as a STUN-server, without large traffic loading.
STUN server need only to make peer exchange!

For example, this chat
can be downloaded as zip, and this working in HFS, like web-based p2p chat,
but only when Internet connection exists.
Else, this not working, and in script.js you can see this:
This is just a public STUN server for making peer exchange through NAT:

In the case of using stun server or relay servers, no need any loading of traffic on HFS,
for example if webcam or voice chat will be using by users.
This users will be a peers, will connected each by each,
and stun server inside HFS
will make the warranty of stable peer exchange in this P2P chat.
HTML & templates / Chat for HFS.
« Last post by username1565 on July 08, 2018, 06:05:22 AM »
Hello. I'm from here:

I'd implemented the file-chat for HFS, using Javascript and JQuery.
This connected to HTTPFileServer, using XHR-queries (you can see this in browser, in console.log).

Source code you can find in attached file, then you can test this.
To make this workable, put (by using drag and drop)
the folder "Upload_messages" inside the main folder of this chat in HFS
and make this uploadable for anyone.

Best regards.
HTML & templates / Re: Responsive small screen template
« Last post by dj on July 07, 2018, 08:07:50 AM »
Put the hfs.diff.tpl in your picture-folder.

Added close × (Esc) button,
fullscreen ⛶  (click first image on the left)

HTML & templates / Re: Jpg-image Template
« Last post by dj on July 06, 2018, 12:09:50 AM »
Don't change the standard template. Put the hfs.diff.tpl in your picture-folder.

For preview pict you need thumbnails (or a lot of memory)
check if you have thumbnails in your photos
otherwise you can generate it with
Pages: 1 2 [3] 4 5 ... 10