rejetto forum

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.

Topics - newbie

Pages: 1

I am seeing this issue as well in hfs2-2.4-rc07. Did the fix posted in the above forum post reviewed/actioned into a fix?

Currently, I can download a 8+GB file successfully....but I have a use case where I need to download a folder w/ lots of tiny files and 1 or 2 large files (that could be <20GB).

Thank you. I appreciate any help or pointers re: this matter.

HFS ~ HTTP File Server / passing utf-8 characters in hfs.tpl function
« on: March 23, 2021, 05:18:36 PM »
I created a simple function like below which exec's an external application.
It takes 2 utf-8 arguments. I've noticed that the args show up with ???? chars for the utf-8 characters in the Powershell script.
I've tried changing the active code page in the PS1 script by adding chcp 65001 and Input/Output encoding to UTF-8, but makes no difference.

However, if I change the active code page for the machine by changing this registry entry and then RESTARTING windows..
Code: [Select]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\OEMCP 65001it sends utf-8 characters into the PS1 script.

Is there anyway to do this, without changing the active page of the machine & restarting?

Code: [Select]
[|public|no log]
{.check session.}
{.exec|powershell.exe -F foo.ps1 "{.^x.}" "{.^y.}"|out=#output.}

I am trying to create/view files and folders with utf-8 encoding. For e.g:
if I send the following curl cmd mkdir fails:
curl.exe -v -u user:password "http://localhost:280/data/Battlespaces/?mode=section&id=ajax.mkdir" --data "name=안녕"

As per this
Unicode support requires the following line in the tpl. It does in mine.
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

When I added a print-to-log line in the tpl in the mkdir script:
[ajax.mkdir|no log]
{.check session.}
{.add to log|"Test:{.^x.}".}
{.break|if={.not|{.can mkdir.}.}|result=not authorized.}
{.set|x|{.force ansi|%folder%{.^x.}.}.}

It prints

Also, doesnt the force ansi operation break utf-8 encoding?

Am I missing some other configuration setting?


HFS ~ HTTP File Server / HFS Scripting cmd: time and filetime
« on: December 03, 2019, 11:10:31 PM »
I want to figure out the time difference between current server time and filetime of a file.
it looks like:
filetime returns a double value based on Delphi time ie days since 12/30/1899
time returns a value based on the optional argument (YY:MM:DD:HH:NN:SS) something like 2019:12:03:18:10:59

How can I get both times in one format, so that I can get the time since the file was created on the server.

HFS ~ HTTP File Server / Move cmd via curl
« on: October 23, 2019, 03:56:12 PM »
I am trying to move some files via a curl cmd.

I am trying the following:
curl -u user:passwd "http://hfserver:280/myData/folder1/folder2/?mode=section&id=ajax.move" --data "dst=folder1/folder3&files=file1.png:file2.png:file3.png:" 
I am guessing the files values are wrong, but I dont know how they should be separated. Is : the right delimiter there?

I see the following code in HFS source:
function selectedFilesAsStr() {
    var a = [];
    return a.join(":");
So, its an array and there's an ending :
So, thats why I tried

HFS ~ HTTP File Server / Get Connections
« on: October 23, 2019, 02:18:01 PM »
I notice that the UI displays a table for Connections with 6 entries for one client.
Is there a way for me to get that list of IP addresses via a script?

There doesnt appear to be a GetConnections here:

HFS ~ HTTP File Server / Firing an event on macro completion
« on: October 22, 2019, 08:40:51 PM »
I would like to fire an event to do something (for e.g run exec) when a template script in my DiffTemplates finishes successfully.

For e.g: when exec |myprog.exe| runs and produces a file.ext, then fire an event that will then call another exec to do something with the file.
ie the appearance of the file constitutes an event, upon which some other process works on that file.

I looked at this and searched in the forum, but it isnt clear to me how I can fire up my own event and watch for it.

I would really appreciate any help.


HFS ~ HTTP File Server / Deploy HFS configuration across various machines
« on: October 22, 2019, 07:31:53 PM »
I would like to deploy my current HFS setup across various machines via cmdline.

My setup has a user-password, specific permissions & DiffTemplates, and there isnt any fixed path between different the only constant is that the data folder will be relative to hfs.exe.

I have tried the following:
1. F:\HFS\hfs.exe -a myhfs.ini F:\HFS\myData
This adds the myData  folder alright, but it doesnt have any of the permissions or DiffTemplates.

2. After saving the vfs to a myHFS.vfs, I tried
D:\Blah1\Blah2\Blah3\HFS\hfs.exe -a D:\Blah1\Blah2\Blah3\HFS\myHFS.vfs
It doesnt work, when run on a machine that doesnt have an F: drive.
It only works on the original machine since an inspection of the vfs shows that the path is hardwired to F:\HFS\myData

Is there any way to do this?


HFS ~ HTTP File Server / Macro support for symbolic folders
« on: October 09, 2019, 02:32:17 PM »
I see the following:
exists | A
checks A for existence, may it be a file or folder.
is file | A
checks A for existence as a file.

and I have been able to use them in Properties:DiffTemplate to check if something is a file or folder.

However, I have not been able to check if a folder is a symbolic link.
Is there a undoc'ed macro for that? Or some other way to do this.
Cause a Search of the forum shows lots of hits for "islink", but it looks like its src code from some .pas file.


HFS ~ HTTP File Server / Executing HFS scripts from curl
« on: October 03, 2019, 03:10:29 PM »
How do I execute a HFS script from curl.
For e.g to create a folder, the HFS:_scripting_commands doc says that I need to use the script: mkdir|foldername

So, how do I use it in curl. I am trying to create a folder called: hfsserver:port/Parent/Child

I tried:
curl -u user:passwd hfsserver:port/Parent/ -XPOST -d "{mkdir|Child}"
and it didnt work.


Pages: 1