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

Pages: 1 2
1
HFS ~ HTTP File Server / Anonymous file deletion, move/copy macro errors
« on: September 26, 2009, 05:11:42 AM »
Two more issues with macros. Firstly here http://www.rejetto.com/forum/index.php?topic=7437.0 you said that copy and move macros return space if the operation failed and could therefore be tested with a length macro in an if statement. I have a folder containing another folder called 'Folder B' and a file called 'File B'. If i perform this macro call:
Code: [Select]
{.if|{.length|{.move|{.postvar|src.}|{.postvar|destination.}.}.}|Operation failed|.}where 'src' and 'destination' are correct, nothing is returned even if 'src' doesn't exist. In other words the 'Move'
macro isn't checking that the file exists before trying to move it and is therefore returning no space.

Second problem: Anonymous file deletion. I've added a delete macro like so:
Code: [Select]
[delete]
{.if|{.length|{.delete|{.postvar|src.}.}|Operatoin failed.|.}

however anonymous users are then able to go to domain.com/~delete just like logged in users and delete files. I see no way in HFS to set delete/copy/move permissions for anonymous users... Sure I could do a logged in check on that macro but that would refuse anonymous users from being able to do these things if i DID want them to be able to...
Am i missing something?

2
HFS ~ HTTP File Server / A couple of macro requests
« on: September 01, 2009, 07:40:59 AM »
I'm not sure if there are undocumented macros that already do this, but could you please add
{.exists.} - accepts path/path+filename. returns true if folder/file exists respectively.
{.isfile.} - accepts path/path+filename. returns true if path is a file instead of folder (some files dont have file extensions).
The reason for {.isfile.} is because if you have a file with no file extension it could look like a folder. also {.isfile.} could be combined with {.exists.} to determine if a file exists or a folder exists.

I was using filesize before but this returns 0 for empty files or folders (which would indicate that they dont exist) and md5 is ALOT slower - speed is important.

The reason i ask for these is because I currently use this code:
{.copy|{.postvar|src.}|{.postvar|destination.}.}
{.if|{.filesize|{.postvar|destination.}.}|1|0.}

It performs a copy then returns 1 if the destination file exists on the hard drive (successful copy) or 0 if the destination file doesn't exist (failed copy). This is perfect unless the file size is 0 in which case i have no way of telling if the destination file exists or not...

Another, much preferred solution would be to have both the move and copy macros return true on a successful operation and false on a failed operation. This would allow me to do this:
{.if|{.copy|{.postvar|src.}|{.postvar|destination.}.}|1|0.}

3
HFS ~ HTTP File Server / HFS PHP Support
« on: August 31, 2008, 04:53:46 AM »
A thought just occurred to me as to how to get PHP working with HFS.
Would it be possible to compile the template the way HFS currently does,
but rather than display online it would instead print the output to a text
file of random name in the HFS directory then call php.exe on that file
(outputting to the same file) then HFS simply copies the text file to
output.

eg.
HFS compiles to c:/<hfsdir>/12345.tmp
HFS calls: "c:/php/php.exe" -f "c:/<hfs dir>/12345.tmp" > 12345.tmp
HFS reads 12345.tmp file and prints to output

Of course the user would need to have PHP installed and in some option
somewhere they'd need to specify the location of the php.exe executable.

4
HFS ~ HTTP File Server / Possible improvement - file search
« on: January 02, 2008, 01:14:22 AM »
I tried to search for <name>* and was waiting quite a while for HFS to complete its search. I clicked a
different folder in the breadcrumb trail (ToG) however HFS continued its search and wouldn't let me load
another folder until it was done. Would it be possible to check all new folder requests for the ip of the
person doing the search - if they match cancel the search (because the person would no longer be viewing
the search page when it was done anyway).


5
HFS ~ HTTP File Server / Logging
« on: December 20, 2007, 03:25:10 AM »
I have 'don't log' enabled for a real, hidden folder called 'template' (TOG). However when people
view any folder on my HFS i get spammed with /template/images/_.gif lines in the log.

Is this a bug? Running 2.3.164.

6
HFS ~ HTTP File Server / Possible Improvement - Restrictions
« on: December 08, 2007, 04:16:33 AM »
Would it make more sense to have
Restrict Access - No Account
renamed to:
Restrict Access - No Restrictions?
'No Account' implies that you are restricted to not being able to log in with any account.

7
HFS ~ HTTP File Server / New Feature: Auto Update
« on: November 15, 2007, 08:33:28 AM »
I couldn't find the todo list so i'm not sure if you've already got this planned:
+ Automatically update
When an update is found (Only for 'check for updates automatically') HFS will automatically download the update
and wait until there are no current connections before running the update script.

8
Everything else / Profile pages and web crawlers
« on: November 13, 2007, 07:41:23 AM »
Would it be possible to create a robots.txt file that stopped crawlers reading any profile pages? As it stands, if you
put your email/msn addresses in your profile you run the risk of every spam crawler known to man getting your
details and bombarding your email :(

9
HFS ~ HTTP File Server / folder menu too long
« on: July 04, 2007, 04:14:57 AM »
The right click menu for folders is getting pretty convoluted. Would it be possible to break
option groups up into subgroups? Stuff like
Filters/Masks ->
Restrictions ->
Accessibility ->

10
Programmers corner / Error compiling HFS 2.2 #106
« on: June 24, 2007, 10:39:32 PM »
Hi, i'm trying to compile HFS 2.2 #106 on Delphi 7 PE. I've got an error in classesLib.pas (which doesn't appear on google)
that says:
Error: Undefined identifier 'FileName'. The error occurs on this here:
Code: [Select]
function TtarStream.fsInit():boolean;
begin
if assigned(fs) and (fs.FileName = flist[cur].src) then
I had an error in HSLib earlier about SD_BOTH and i just defined it to be 2 within hslib.pas. Would these errors
be related? I can't figure this one out myself due to there being nothing on classeslib on google :S

11
HFS ~ HTTP File Server / Feature Request
« on: May 31, 2007, 01:02:44 PM »
Hey Rejetto,

Could a 'Overwrite Files' checkbox be added to the uploads context menu above 'Upload for Users' link
that would make all uploaded files with the same name as files already in that folder overwrite the file
instead of rename the file being uploaded?

Also, could 'allow archived downloading' checkbox be made for all folders that would allow/disallow
those folders to be archive downloaded? Maybe also an 'ignore archive rules' option for users?

Thanks

12
HFS ~ HTTP File Server / upload icons
« on: May 12, 2007, 11:52:00 AM »
Can we get an option to show a tray icon for each upload as well as download?

13
HFS ~ HTTP File Server / Idea for HFS
« on: February 25, 2007, 10:30:40 AM »
It would be helpful for the template distributers if a 'generate executable template' button was added to the
template window. This button would open up a new window that allows the author to select files and folders
and HFS settings. Once the author clicks ok, a new file is created, say .tpe (template executable) that, when
opened with HFS woudl automatically modify the users HFS to the new template settings. Of course, there
would be a warning window that pops up showing the user what settings are going to be changed with OK/Cancel
buttons.

Basically, the author could do something like:
  -Write template
  -Add /template folder to root
  -Add MIME types
  -Set folder attributes (hidden, not count as download etc)
and turn it into a runnable template file for HFS. This could potentially make installation of new templates alot
easier for the less tech savvy users.

14
HFS ~ HTTP File Server / Save buttons
« on: February 14, 2007, 06:55:07 AM »
Would it be appropriate to move "Save total in/out" and "Auto-save VFS on exit" from the Start/Exit toolbar group to Save options?
I know you're correct in saying that they're Start/Exit commands, but they're also Save Options...

15
HFS ~ HTTP File Server / Files List
« on: February 09, 2007, 04:27:52 PM »
Any chance we could get a [Filelist] field that would allow us to create a page containing the files list?
At the moment it's relatively useless.

Pages: 1 2