rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: DNic on November 20, 2008, 11:06:37 PM
-
First I just wanted to say HFS is exactly what I was looking for. Took a long time to find it 8)
Ok so I'm on the latest beta and I have a folder that everyone can see called "Image Hosting". When a user logs in they can see their folder only, and of course they can upload, delete images here.
Now when that user gives out that link or uses it, it asks for that person to login before they can view the image. Now I could swear that earlier I was able to view the image, but something must've of changed and I can't for the life of me find it.
Thanks.
P.S. I tried to register, but am not receiving a confirmation e-mail.
-
Anybody? I hope I was clear enough on what I wanted.
-
Hi DNic, as forum admin i can see your IP and had a look at your HFS.
I see "image hosting" has no protection, i can enter it, so no login should be asked accessing images inside.
Point is: there are no images currently, so i had no luck on testing it.
You can post a link here, for testing.
Remember this forum is public: feel free to remove the IP address from the url, I don't need it and you'll preserve your privacy.
-
About the email sending: sorry for the problem. I tried to register an account, and i didn't receive the email either!
In the while i activated your account, so you don't need to get the email anymore.
Anyway, that is very strange, because i had a look, and while we were not able to get any email, other people got it and registered successfully.
Some does, some doesn't. I'll investigate deeper. Thank you for reporting anyway.
-
Thanks for the reply. Image hosting is freely accessible. However there are hidden folders inside of it that a person can view when entering a password. You can't upload in the "Image Hosting" folder, but once the user logs in they can upload and delete in their own folder.
Here is an example link of a pic: http://*****/Image%20Hosting/Test/Light%20Blue.jpg
Thanks for pushing the registration 8)
-
has folder "test" a lock icon on the left? (virtual file system)
-
has folder "test" a lock icon on the left? (virtual file system)
Yes it does so only that person can access and upload to it. I know your gonna say thats why it comes up with the login box. But I'm positive when I first upgraded the to the newest beta I was able to do it, so the person looking at the link can't delete it and view other pics in the users folder. I tried leaving it unlocked and unchecked browsable, but then even the user of the folder can't see what he uploaded and delete if necessary.
-
you want people to access but don't see the listing (and of course don't delete and upload).
at the moment the easiest way to do it, is to duplicate the folder.
you'll get 2 real folders for the same folder: one as it is now, and one public but with no "browsable".
-
you want people to access but don't see the listing (and of course don't delete and upload).
at the moment the easiest way to do it, is to duplicate the folder.
you'll get 2 real folders for the same folder: one as it is now, and one public but with no "browsable".
How do I sync/link the 2 together?
-
what kind of data of the folder do you want to sync?
-
what kind of data of the folder do you want to sync?
I got the uploads to Image Hosting restricted to any image files. So if user Test uploads something to his locked folder how can I sync it to his public viewable, but not browsable folder?
-
being them 2 real folders pointing to the same folder on disk, there's no need to sync anything.
http://www.rejetto.com/wiki/index.php/HFS:_The_Virtual_File_System#Real_folders
-
being them 2 real folders pointing to the same folder on disk, there's no need to sync anything.
http://www.rejetto.com/wiki/index.php/HFS:_The_Virtual_File_System#Real_folders
Ok I created another real folder of test under Image Hosting. One test is locked the other is not. However when i copy the link to one of the images it still ask for a password. If I uncheck browsable in the unlocked test I can't even log into the locked test folder.
-
the folders have for sure 2 different names (or they are under different folders).
so even if you upload to folder1, you must give the link as folder2.
-
the folders have for sure 2 different names (or they are under different folders).
so even if you upload to folder1, you must give the link as folder2.
Ah I see what your saying......is there anything in the future plans to be able to do what I'm trying to achieve?
-
Wouldn't this solve your problems:
Users have to go to the root of your website and login there. They then have to browse their way to their own folder to upload / delete images.
Anyone who tries to view the folder contents without being logged in would see a 401 unauthorized page.
To achieve this, you need to right click the main folder that contains all the sub folders for your users (I believe you called it "Image Hosting") and select properties. Go to diff template and paste there the main section of the template you are using (the section called []).
Now modify the text you just pasted so it looks like this:
{.if|%user%|
<<Place the original template code here>>
|
<html><head></head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested.</p>
<hr>
<p>Please <a href="/">go back</a> and provide valid login credentials.</p>
</body></html>
.}
It basically checks if a user is logged in before showing the template. If a user is not logged in, it shows a custom 401 error page.
If a user or someone else from the internet requests an image download, it simply shows the image.
Note: be sure to disable file listing, as anyone would be able to request and view it.
-
On the part where it says
<<Place the original template code here>>
do you mean whats listed in the entire hfs.tpl?
Oh and if someone goes to "Image Hosting" (as it sits right now) they can see no user folders. When they sign in they can only see theirs.
-
On the part where it says
<<Place the original template code here>>
do you mean whats listed in the entire hfs.tpl?
Not the entire template, only the main part. Either the [] section or the most top part of the template (until a new section starts), this depends on the template you are using.
Oh and if someone goes to "Image Hosting" (as it sits right now) they can see no user folders. When they sign in they can only see theirs.
With the method i gave you, a regular visitor will see the 401 error page. A loggedin user will only see his or her folder.
-
I'm using the default template (haven't played with this yet).
I posted your code and what I think to be the first section of the template. I get the 401 msg if I click on Image Hosting w/o signing in and if I sign in I can get to the folder.
However on the top of the users folder I have this:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
so I must've not copied the exact right amount or too much. Also I tried using a link to an uploaded image and it still asks for a password.
-
I'm using the default template (haven't played with this yet).
I posted your code and what I think to be the first section of the template. I get the 401 msg if I click on Image Hosting w/o signing in and if I sign in I can get to the folder.
However on the top of the users folder I have this:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
so I must've not copied the exact right amount or too much.
It seems you are missing a "<" thats supposed to be in front of the !DOCTYPE thingy. Just insert a "<" to fix this.
Also I tried using a link to an uploaded image and it still asks for a password.
Ok, i forgot to mention that :P. Go to the properties page of a user folder and check the 'anonymous' box in the 'access' tab. This makes it so that everyone who is NOT loggedin will have access to that folder. You will have to do this for every user folder.
A different user who is also logged in will NOT see the folder of other users because of the anonymous checkbox (cause he is not anonymous). If he, however, clicks on a direct image link, he will still be able to download the image.
Hope it works now :P
-
Ah can't believe the simple < that I missed!
Thanks a ton Eagle! It works exactly the way I want it now. User can upload images and give out the links w/o exposing any other pics they uploaded.
Where can I find out more info about the diff template section? Also when I do use a different template style will this affect the diff template section of "Image Hosting"?
-
Ah can't believe the simple < that I missed!
Thanks a ton Eagle! It works exactly the way I want it now. User can upload images and give out the links w/o exposing any other pics they uploaded.
Great, and you're welcome ;D
Where can I find out more info about the diff template section?
There is not much to it.
Everything you enter in the diff template box will 'overwrite' the main template. Meaning you can choose to only overwrite one [section], or the whole template. This effect only takes place on the folder you used the diff template on and all the underlying sub folders.
Also when I do use a different template style will this affect the diff template section of "Image Hosting"?
Yes, you will need to copy the main section (Either the [] section or the most top part) of the new template and place that in the diff template box of the "Image Hosting" folder.
-
I switched to the RAWR template and copied over the template changes, but its doesn't work now.
Now (w/o logging in) i can see all the user folders instead of getting a "Authorization Required" message, and can access them. (Which a non logged user shouldn't be able to due since I have "List protected items for allowed users" checked)
So I decided I can just use the way I had it with the default HFS template, but when I enter that in the page is all out of whack.
Look forward to your input/help.
-
Install the RAWR-Template on your hfs, then apply the following code as the 'Diff Template' on "Image Hosting".
[]
{.if|%user%|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
{.$disclaimer.}
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="robots" content="noindex,nofollow"/>
<title>{.!lv_title.} - {.!lv_home.}%folder%</title>
<script type="text/javascript" src="/template/rawr_default/code/rawr_main.js"></script>
<script type="text/javascript" src="/template/rawr_default/code/rawr_previewbox.js"></script>
<link rel="stylesheet" type="text/css" href="/template/{.!theme.}/code/{.!theme.}_main.css"/>
<script type="text/javascript">
var serverFolder="%folder%";
var serverHost="%host%";
var theme="{.!theme.}";
var mod_folder_tasks="{.!mod_folder_tasks.}";
var mod_statistics="{.!mod_statistics.}";
var mod_shoutbox="{.!mod_shoutbox.}";
//Language Strings
var lv_loading="{.!lv_loading.}";
var lv_advSearch="{.!lv_advSearch.}";
var lv_search="{.!lv_search.}";
var lv_searchAlert="{.!lv_searchAlert.}";
var lv_files="{.!lv_files.}";
var lv_folders="{.!lv_folders.}";
var lv_both="{.!lv_both.}";
var lv_recursive="{.!lv_recursive.}";
var lv_current="{.!lv_current.}";
var lv_root="{.!lv_root.}";
var lv_hideTitle="{.!lv_hideTitle.}";
var lv_showTitle="{.!lv_showTitle.}";
</script>
<noscript><style type="text/css">.hide{display:none}</style></noscript>
<!--[if lte IE 6]><style type="text/css">#mainInner{width:980px}</style><![endif]-->
</head>
<body>
<div id="mainOuter">
<div id="mainInner"><div id="mainInner1"><div id="mainInner2"><div id="mainInner3">
<div id="header">
<div><div id="bCrumbs">{.breadcrumbs|{:<a href="%bread-url%">{.or|%bread-name%|{.!lv_home.}.}/</a>:}.}</div></div>
</div>
<div id="content">
<div id="navbar">
{.if not|%user%|<div class="bigBtn"><a href="~login"><span>{.!lv_login.}</span></a></div>.}
<div class="bigBtn">
<a href="javascript:openTransfers()" class="hide"><span>{.!lv_transfers.}</span></a>
<noscript><a href="/~progress" target="_blank"><span>{.!lv_transfers.}</span></a></noscript>
</div>
{.if|{.get|can upload.}|<div class="bigBtn"><a href="~upload" title="{.!lv_uploadTitle.}"><span>{.!lv_upload.}</span></a></div>.}
{.if|{.{.!btn_back.}=on.}|{.if not|{.%folder%=/ .}|<div id="backBtn"><a href=".."><span>{.!lv_back.}</span></a></div>.}.}
</div>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="100%" valign="top" id="tableCol">
%folder-comment%
{.$files.}
</td>
{.if|{.match|{.!mod_folder_tasks.};{.!mod_statistics.};{.!mod_shoutbox.}|on.}|
<td width="175" valign="top" id="moduleCol">
<span id="specialBox"></span>
{.if|{.match|127.*;10.*;192.168.*|%ip%.}|
<div class="module">
<div class="modHeading">
<span><img src="/template/rawr_default/images/spacer.gif" width="8" align="top" alt=""/></span>
{.!lv_check.}
</div>
<div class="modContent">
{.if|{.?updates.}|
{:
{.set|new_build|{.load|http://rawr-designs.com/updater.php?project=template&ext=.txt.}.}
<span>[{.!build.}]</span>{.!lv_currentBuild.}:<br/>
<span>[{.^new_build.}]</span>{.!lv_latestBuild.}:
<div class="divide">
<center>
<a href="http://rawr-designs.com/?page=template" target="_blank">
-
{.if|{.{.^new_build.}={.!build.}.}|{.!lv_homepage.}|{.!lv_download.} {.^new_build.}.}
-
</a>
</center>
</div>
:}
|<center><a href="http://%host%%encoded-folder%?updates=1">- {.!lv_checkNow.} -</a></center>.}
</div>
</div>
.}
{.if|{.{.!mod_folder_tasks.}=on.}|
<div class="module">
<div class="modHeading">
<span>
<a href="javascript:pinModule('Folder_Tasks')" id="Folder_Tasks_Link" title="{.!lv_hideTitle.}"><img
class="hide" src="/template/{.!theme.}/images/hide.gif" align="top" alt=""/>
<noscript><img src="/template/rawr_default/images/spacer.gif" width="8" align="top" alt=""/></noscript>
</a>
</span>
{.!lv_folderTasks.}
</div>
<div class="modContent" id="Folder_Tasks">
{.if|{.{.!mod_search.}=on.}|
<form action="/" name="simpleSearch" method="get">
<input class="formInput" type="text" name="search" size="13" maxlength="32" value="{.$search-data.}" onclick="if(this.value=='{.$search-data.}')this.value=''"/>
<input type="submit" value="Go"/>
</form>
<a href="javascript:initPreviewBox('specialBox','search')" class="hide">{.!lv_advSearch.}</a>
.}
{.if|%number%|
<div {.if|{.{.!mod_search.}=on.}|class="divide".}>
{.!lv_sortBy.}:<br/>
<a href="{.get|url|sort=t|rev={.and|{.?sort=t.}|{.not|{.?rev.}.}.}.}">{.!lv_age.}</a>,
<a href="{.get|url|sort=d|rev={.and|{.?sort=d.}|{.not|{.?rev.}.}.}.}">{.!lv_hits.}</a>,
<a href="{.get|url|sort=n|rev={.and|{.?sort=n.}|{.not|{.?rev.}.}.}.}">{.!lv_name.}</a>,
<a href="{.get|url|sort=s|rev={.and|{.?sort=s.}|{.not|{.?rev.}.}.}.}">{.!lv_size.}</a>,
<a href="{.get|url|sort=e|rev={.and|{.?sort=e.}|{.not|{.?rev.}.}.}.}">{.!lv_type.}</a>
</div>
<div class="divide">
<span>[%number-files%]</span>{.!lv_files.}:<br/>
<span>[%number-folders%]</span>{.!lv_folders.}:<br/>
<span>[%number%]</span>{.!lv_totalObjects.}:<br/>
<span>[%total-size%]</span>{.!lv_totalSize.}:
</div>
<div class="divide">
•<a href="?tpl=list&folders-filter=%5C{.if|{.get|can recur.}|&recursive.}" target="_blank" title="{.!lv_fileListingTitle.}"> {.!lv_fileListing.}</a>
{.if|{.get|can archive.}|<br/> •<a href="%folder%~folder.tar{.if|{.get|can recur.}|?recursive.}" title="{.!lv_archiveTitle.}"> {.!lv_archive.}</a>.}
{.if|{.get|can upload.}|<br/> •<a href="~upload" title="{.!lv_uploadTitle.}"> {.!lv_upload.}</a>.}
</div>
.}
</div>
</div>
.}
{.if|{.{.!mod_statistics.}=on.}|
<div class="module">
<div class="modHeading">
<span>
<a href="javascript:pinModule('Statistics')" id="Statistics_Link" title="{.!lv_hideTitle.}"><img
class="hide" src="/template/{.!theme.}/images/hide.gif" align="top" alt=""/>
<noscript><img src="/template/rawr_default/images/spacer.gif" width="8" align="top" alt=""/></noscript>
</a>
</span>
{.!lv_statistics.}
</div>
<div class="modContent" id="Statistics">
<div id="stats">{.$stats.}</div>
{.if|{.{.!sym_ip.}=on.}|<br/><span>[%ip%]</span>{.!lv_yourIp.}:<br/>.}
{.if|%user%|<span>[%user%]</span>{.!lv_yourId.}:.}
</div>
</div>
.}
{.if|{.{.!mod_shoutbox.}=on.}|
<div class="module">
<div class="modHeading">
<span>
<a href="javascript:pinModule('Shoutbox')" id="Shoutbox_Link" title="{.!lv_hideTitle.}"><img
class="hide" src="/template/{.!theme.}/images/hide.gif" align="top" alt=""/>
<noscript><img src="/template/rawr_default/images/spacer.gif" width="8" align="top" alt=""/></noscript>
</a>
</span>
{.!lv_shoutbox.}
</div>
<div class="modContent" id="Shoutbox">
<iframe src="/template/rawr_default/shoutbox/display_posts/?sort=t&rev=1" height="240" width="153" frameborder="0"></iframe>
</div>
</div>
.}
</td>
.}
</tr>
</table>
</div>
<div id="footer">
<br/>
<div>{.!lv_poweredBy.}: <a href="http://www.rejetto.com/hfs">rejetto HFS</a> (%version%, build %build%) & <a href="http://rawr-designs.com">RAWR-Designs</a>.</div>
{.!lv_buildTime.}: %build-time%sec
</div>
</div></div></div></div>
</div>
<script type="text/javascript">pageLoad()</script>
</body>
</html>
|
<html><head></head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested.</p>
<hr>
<p>Please <a href="/">go back</a> and
provide valid login credentials.</p>
</body></html>
.}
The RAWR-Template works a bit different than the default template, but this should work. ;)
-
That did the trick, thanks a million! I was scratching my head for a bit on that one.
-
i would put in the IF just little more than the %list%.
but if you found something working, happy end.