rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: DustinDuse on February 07, 2007, 02:41:46 PM
-
Would it be possible to put HFS upload page into a website for visitor to upload stuff there insted of going to another site to upload?
-Dustin
--Thanks
-
Do you mean like put the upload form on a different website completely?
I don't think this is possible... it is possible though to put the hfs upload page of your server into an iframe, frame, or popup window i just tested it then... rejetto will know how to put the form on another site IF its even possible.
Iframe code, thought i would put this here because i often forget how to do an iframe :P:
<iframe src="http:// *** YOUR URL OF YOUR UPLOAD FOLDER*** /~upload" frameborder="0" height="300" width="500" marginheight="0" marginwidth="0" name="iframe" id="iframe" allowtransparency="false"></iframe>
-
you can use frames, or this other solution
<form name=frm action="http://address_of_your_hfs/uploadfolder/~upload" method=post enctype="multipart/form-data" onSubmit="frm.upbtn.disabled=true; return true;">
<input name=fileupload1 size=70 type=file><br />
<input name=upbtn type=submit value="Upload files">
</form>
-
Thanks i was thinking after i posted this that my website im putting it on uses iframes...
-
I used the Form one but when i try it out HFS says Failed ???
-
no idea
if you can't get it working, try frames
-
ok i tried with the form and my local address this is my findings:
This is what the hfs log says about it:
12:39:16 PM 127.0.0.1:1961 Upload failed, Not allowed: GITS_2.jpg
12:39:16 PM 127.0.0.1:1961 Uploading GITS_2.jpg
I think the only successful method will be to use frames. you could just make your hfs template look like your own site in the frame and people might not even notice :).
-
well, there must be a reason for it....
but i got no time atm
-
Well thanks for all your help
-
ok i got something eles to ask... On a differnt website like before.. can i put how many hits a files had?
-
no i do not think this is possible, this is because %item-dl-count% is a number that is created by HFS when the page is opened in HFS, if you simply place the %item-dl-count% on another page, it will not run, and thats all you will see on the page, %item-dl-count%.
-
you can do it with php/asp/etc. maybe javascript.
you download from hfs the page with the counter, and extract the text.
-
the server my site runs on has php 5...
-
so it's like a
<?
if (preg_match('°reg-exp-here°', file_get_contents('http://your_hfs_address'), $m))
echo $m[1];
?>
easy.
if you don't know php, you need the help of a php programmer to complete this.
good luck
-
Wow i just now notice that i spelled my username wrong lol... opss.... Well Thanks for all your help Rejetto. i love hfs... it get used all the time by my friends.. but i got one last thing(hopefully)... Cant i make it so when Bill(fake name) comes to look at some files it will automaticly sign him in b/c hes it gets his ip.... i know you can put names to ips but can it sign someone in?... P.S. did i say that i really love hfs?
-Dustin (that spelled right?) lol
-
LoL i think you can change it in your profile :P rofl 'Dusitn'Duse is supposed to be 'Dustin' i'm assuming.
Um no i don't think you can sign in someone automatically from an IP address.
-
yes, it is possible using javascript.
something like if (ip == "1.2.3.4") redirect("http://bill@host");
if you are good to javascript, because HFS has no such feature.
-
lol only problem would be if their IP is dynamic :P
-
Well i was only planing on setting it up for a few people with static ips...i hate java :-\
EDIT: I Plan on posting the code here when im done so maybe someone eles will be able to use it.
-
ok well i got something that works only something is messing with me... i get a message that says your about to login as admin on a website that does not reqiure you login whould you like to visit this site? i click yes and it pops up again and again! err!!!! what do i do? i addeed the code im useing below...
<!--#if expr="${REMOTE_ADDR} = /^127.0.0.1/" -->
<script language="javascript">
{location.href="http://admin:password@127.0.0.1:8080" }
</script>
<!--#endif -->
-
ok well i had most things open and other passwored so i just passworded it all so you have too use a guest account... im useing the Stevens guy login template... i think this could go on the todo list? i like the idea of auto login
-
does that code really work?
-
Yes but if you have firefox people they can get errors so i forwarded them to a hinden folder just like the root folder. If you password protect root folder it dont work. but i think im gunna try something. If you dont password protect root(where i linked to frist) in firefox i get a warning and it keeps repeating. kinda strange?
-Dustin
-
maybe the <!--#if
is not compatible with firefox
i never saw it