rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: fahad15090 on January 08, 2021, 03:12:48 AM

Title: can we restrict limit of storage access to user
Post by: fahad15090 on January 08, 2021, 03:12:48 AM
I make virtual disk (4 gb) and added to HFS, i try to upload about 5 gb data of to it but problem is that hfs start to upload 5 gb of data to 4gb of disk with no any warning and error .

https://www.howtogeek.com/howto/5291/how-to-create-a-virtual-hard-drive-in-windows-7/ (https://www.howtogeek.com/howto/5291/how-to-create-a-virtual-hard-drive-in-windows-7/)

My suggestion is to add information collection  about disk of folder and data that is upload to HFS ,if upload is higher then disk then says your storage is full please delete some files.

Also another suggestion is {when add folder to HFS (virtual or real) it ask for set storage limitation of  folder you added. This help to restrict someone in network from unlimited uploading to server nd this will controled by user account added to hfs.

Hope someone understand me. :D
Title: Re: can we restrict limit of storage access to user
Post by: LeoNeeson on January 08, 2021, 08:30:14 AM
We can understand you perfectly. :) You want this:

1) HFS check if there is available free space on disk before starting the upload.
2) Limit the available space to upload, depending which user is logged in.

All this can be done using macro (if I'm not mistaken). Please wait the help of some other forum user (expert on macros).
Cheers,
Leo.-
Title: Re: can we restrict limit of storage access to user
Post by: dj on January 08, 2021, 11:09:23 AM
1) HFS check if there is available free space on disk before starting the upload.
you can use macro (https://www.rejetto.com/wiki/index.php?title=HFS:_scripting_commands#File_manipulation) disk free

Takeback shows Free Space Available For Upload
In mobil-light you can set limit (https://github.com/dj0001/hfs-template/blob/gh-pages/mobil-light_V5.5.tpl#L183) to '{.disk free|D:\.}'/1e6

update: {.disk free|%folder%.} also works