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 - skb

Pages: [1] 2 3
Bug reports / Re: Download interrupted after starting another
« on: October 23, 2017, 07:51:57 PM »
Hi, I'm pretty sure this is _not_ the normal or expected behavior, as I've never heard of any such limitations in discussions here, and I know some of our colleagues here have large and busy sites.

But, I can't personally replicate your test -- my instance of HFS has only very small text data files for an android project, and even when I tar them all together and download, it completes too fast for me to switch to another browser and try to interrupt it.

Sorry that I'm only stating the obvious, but for debugging, if you're using a custom template, please repeat your test with your server using only the default template, just to rule out any possible template issues.

Also, do the logs in your HFS server window give any insights? There are several more extensive logging options that you can enable temporarily, so see if these provide any pointers to what's going on.

Programmers corner / Re: remotely renaming files using post
« on: October 23, 2017, 03:55:28 AM »
Probably not really a useful answer, but, I've only renamed files using the {.rename|oldname|newname.} command macro. That may well do some post under the covers, but as far as I know, the only way to rename files is to have some code in the server's config call the rename macro.

Thanks for the speedy reply, and for all your work on HFS!

No rush on the fix, as it's really no big deal: a minor bug that's hard to trigger in real life! (I was doing this manual rename to make test file for a new feature, and in my production version such renames won't be needed.) 

Or, if necessary, I can use a different "flag" character in the data file name than "$".

Cheers, Steve

Remember, there is no cloud. It's just someone else's computer!

No matter what the server, if you make a 450 GB copy, it needs to go somewhere.

(As several suggested, using a downloader program would scan for a list of all the files on the server, and then would request them all one by one for download, so there would be no server-side copy. The "Archive" feature zips all the individual files into one large single file, and then downloads that one file, thus it does require a copy on the server.)

Not really debugged this at all yet; I've merely noticed it in my modified version of the standard template, and then restore the default one to confirm it wasn't just me.

If a file name includes numbers, and you rename it to insert a "$" before those numbers, the $ and some numbers are deleted from the name.

The specific example I found was attempting to rename the file name "SCS_A01_10039.CSV" to "SCS_A01_$10039.CSV".

The resulting file name became: "SCS_A01_039.CSV".  That is, the "$10" was deleted from the new name.

"$" works fine in other parts of the string, but before a digit 1-9, the $ and one or two digits are removed.

HTML & templates / Re: Documentation for item-resource?
« on: July 25, 2016, 03:54:54 AM »
Nevermind!  :P

After posting I read the recent ticket about "move files after upload", and found Mars' suggestion to use the log for debug output, e.g. add "{.add to log| event upload completed  by %user%.}" to the completed event handler. Works well and easily -- Thanks Mars!!

I used this to print out %item-name%, %item-resource%, and %item-url%. Looks like I can parse the URL to figure out which folder the upload is going to, and the -resource symbol has the windows file path rather than the VFS path.

Any other debugging tips are welcomed!


HTML & templates / Documentation for item-resource?
« on: July 25, 2016, 01:56:34 AM »
Is there documentation for %item-resource%?

On the list in the forums at , it is mentioned, but with no explanation.

In the docs on the wiki, at , it is not mentioned at all.

More generally, what is a simple way to find out the value of various symbols with test code? That is, while I'm trying to figure stuff out, what sample code could I put into, say, an [upload-completed] event handler to show me the values of various symbols for each file?  Can I write stuff to, say, the java script console?

Or, would it be better to use the [upload-success] section for this sort of temporary debug output?

Thanks for clues,

Does the "template revision" line in the default hfs.tpl get changed whenever there are changes to this template?

That is, if I download the current version of hfs.exe, and choose the command  "Menu > HTML Template > Edit", it will generate an hfs.tpl file in the same folder as the hfs.exe file, and in this file, it has:

"Welcome! This is the default template for HFS 2.3
template revision TR2."

Can I assume that these lines change whenever Rejetto makes any revisions to the default template? 

For example, back with version 2.3f, Rejetto fixed a bug with cookies and file renames in the default template. Did this version string change with that update?  I didn't think to check at that time...

This is very probably un-related, as I wasn't using WFetch, but but just a few days ago I had an issue where some uploads from my Android program were failing, and it was because they requested chunked encoding rather than sending a Content-Length.

My log output was like yours: In the failed uploads I saw the POST request without the previous "Uploading" and "Fully Uploaded" lines.

Try "Menu > Log > Log what > Requests dump", so that HFS will print the requests headers it receives. Then see if the failing cases have Transfer-Encoding chunked.

(In my case, looking with Wireshark, I saw that HFS was returning a 405 error response to the chunked mode requests, but the Android file upload routine (in the Phonegap files plugin) was losing this, and returning a 200 response to my code. The fix for me was an optional flag to this Android upload routine telling it not to use chunked mode. Perhaps WFetch has a similar no chunks option.)


Fixed by version 2.3f  :D (Via changes to the standard hfs.tpl file included in this version).

I had the problem recur despite the workaround suggested earlier in this thread, but upgrading to version 2.3f and patching my stripped-down version of the hfs template with the changes to the cookie handling from the new hfs.tpl made the problem go away.

Thanks for the fix, Rejetto!


HTML & templates / Re: Limits to uploaded files by size?
« on: August 09, 2015, 01:12:48 AM »
Ah, LeoNeeson, very clever using Google to search the forum! I'd never thought of that, and was trying to find stuff using only the local search tool. Thanks for the examples!


HTML & templates / Re: Limits to uploaded files by size?
« on: August 09, 2015, 01:07:38 AM »
Wow, thanks! That is quite a nice solution! I was thinking I'd need to code some macros; very great to have it as a new built-in! :)

HTML & templates / Limits to uploaded files by size?
« on: July 26, 2015, 01:11:39 AM »
Is there an easy way to restrict uploads to "small" sizes, e.g. only files less than 100KB?

Can the system know the file size before it is uploading it? Alternatively, is there any way to abort an upload if the file is larger than a limit? Or, perhaps drop it after the upload is complete? Do we know the size when the [upload completed] event happens? Is it possible to delete a large file at that point?

I fear that this question might be answered already, but the terms I tried to search for (like "file size") are so widely used that I did not find useful results.

Thanks for any pointers.

HTML & templates / Re: Format of " (1)" added to duplicate file name?
« on: July 26, 2015, 01:00:34 AM »
Thanks! Very slick! Impressive what you can do with macros.

Sorry, been away for awhile. I came back because I hit this bug again on Firefox but not Chrome (but Firefox is the browser I'd used more in the past for HFS access, so it was more likely to have old context.)

I'll put your suggested fix in my template now, but it will probably be a while before the bug gets triggered again.

When it happened today, I tried deleting the HFS cookie with Firefox's "File > Preferences... > Privacy > Remove individual cookies", and then restarted my browser, and this did not help. Then I deleted the cookie again, restarted the server and restarted my browser, and it still didn't help. I tried Firefox's "clear everything for the past hour", and it didn't help (because I think whatever was causing the problem is from a few weeks ago.)

Finally, I had Firefox clear all of its saved stuff from any time (History > Clear recent History... ; and then put a check by every item, and set "Time range to clear" to "Everything". Then browser restart, and now a rename worked.

I'd been running HFS regularly back when I first posted, but then shipped a version, and shut down my test copy. So, my server has been down for a few weeks, though the actual users have not reported any issues with theirs.

Today I fired up my copy again, and hit the bug when I first logged in. So, whatever bit of history was confusing Firefox is probably several weeks old.

Anyway, sorry to leave this thread hanging so long. I'll install your patch and see if the bug comes up again.

Pages: [1] 2 3