rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: vigneshka on June 06, 2011, 01:10:34 PM

Title: Email Link
Post by: vigneshka on June 06, 2011, 01:10:34 PM
Say a user uploads a file to the file server. Is there any way for that user to send a download link/url to an anonymous user? This link would only share that specific file. Thanks!
Title: Re: Email Link
Post by: raybob on June 08, 2011, 12:49:51 AM
You could try making the folder with the uploads as non browsable, then have the upload-results page display %url% for the uploader to copy and send.
Title: Re: Email Link
Post by: rejetto on June 10, 2011, 10:17:09 AM
after you upload you get the name of the file with a link.
you can copy that.
Title: Re: Email Link
Post by: vigneshka on June 12, 2011, 06:17:44 AM
raybob95: If I made the folder unbrowsable, then the uploader gets the error "This resource is not accessible." Also, how do I make it so that the upload results page shows the url?

rejetto: If a user uploads something to a password protected folder, how do you get an anonymous link that works for others without a password?

Thanks for your help!
Title: Re: Email Link
Post by: raybob on June 12, 2011, 03:56:26 PM
In the [upload results] section, just add a %url% where you see fit.

Also, you need to make the folder so that it isn't browsable (uncheck the box), but at the same time, make sure 'Anyone' has permission to upload to and access the folder.
Title: Re: Email Link
Post by: vigneshka on June 13, 2011, 08:21:39 AM
Making a folder unbrowsable does so for the uploader as well. I want the uploader (a known user with an account and password) to be able to browse a password protected file system and upload/delete files with full control. I also want to the uploader to be able to share a specific files to a random user (no account/password) via a link that does not give access to anything but the selected file. Sorry for the confusion, I didn't explain it properly. Also, thanks for all your help and HFS is amazing.
Title: Re: Email Link
Post by: rejetto on June 13, 2011, 10:09:53 AM
there's no specific function for what you want to do, you have to rely on existing ones, but there's more than one way to go.

my suggestion: make the protected folder as usual, with permission for the account. Let's say the folder is named "myfiles".
Then re-add the folder to the virtual file system, this time it will have a different name, like "myfiles-give", but it points to the same folder on the disk.
This instance of the folder shall not be protected, but you remove the "browsable" flag. (under properties > flags)

Now when you want to give away the file you just uploaded, copy the link to it and pasting modify the url by adding the -give to myfiles.
People will access the file unprotected, but only those who have the direct link to it, others won't find it because the folder is not browsable.
Title: Re: Email Link
Post by: vigneshka on June 13, 2011, 10:46:23 AM
This is great. Thanks so much for your help!
Title: Re: Email Link
Post by: raybob on June 13, 2011, 06:31:05 PM
For me, I have the folder set as unbrowsable, and within the hfs.diff.tpl,  I have nothing under the [] section, so there's no way to view the directory. 

You can still upload to a folder even when it's unbrowsable, so long as you link directly to the ~upload page   ;)
Title: Re: Email Link
Post by: rejetto on June 13, 2011, 06:39:00 PM
i think the "upload" page is not available in the latest template.
i will work on this issue.
Title: Re: Email Link
Post by: raybob on June 14, 2011, 02:12:52 AM
Well I wouldn't know because the template I'm using is based off of build 274 with some build 277 and left over 2.2f mashed in.   :D

Actually on second thought I think I added in the ~upload page myself...  whatever you could just put the upload stuff under [] section if you really wanted to.
Title: Re: Email Link
Post by: rejetto on June 16, 2011, 09:13:23 AM
as a side advice, if you want to stay up to date with the template, you just have to NOT edit the template itself, but use the diff template feature.
With diff tpl you add and change the sections you want, while the rest is kept untouched.
Title: Re: Email Link
Post by: raybob on June 16, 2011, 05:08:27 PM
Yeah but I've changed every section  ;D

I find it easier to type in notepad rather than HFS and so I link to the diff tpl file rather than just putting it directly in HFS.  
Title: Re: Email Link
Post by: rejetto on June 20, 2011, 02:20:56 PM
such customization is allowed, but at a price, as just said. You decide. :)
Title: Re: Email Link
Post by: raybob on June 20, 2011, 07:22:48 PM
If you know anything about the template and coding you can usually just go into the new template and manually merge the new parts with your old template.