rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: vbn on May 19, 2010, 02:17:13 AM

Title: Additional Comments (descript.ion)
Post by: vbn on May 19, 2010, 02:17:13 AM
I am looking for a way to include a secondary comments method. It is required to store MD5 hashes for uploaded files.

I want to display the MD5 for a file in the listing table. I am able to append the md5 hash to a comment and get it displayed but then manual comment updation by the uploader is not clean.

Any ideas ?

Title: Re: Additional Comments (descript.ion)
Post by: SilentPliz on May 19, 2010, 05:21:48 PM
I don't know what's the template you use.

If you can post your template here, I could propose you an another way to display your comments and md5 hash.


Quote
updation by the uploader is not clean.

If you can also say more what does not work as you want.

If you mean the user can not uploaded an *.md5 file ... It's normal. It's for avoid that a .md5 file be replaced by a false *.md5 by a user.

An md5 file can be created when we upload a file, but an file .md5 cannot be uploaded.
Title: Re: Additional Comments (descript.ion)
Post by: vbn on May 20, 2010, 06:59:13 AM
Its the same default template in latest beta...just my automation on server side creates a MD5 for a uploaded file and appends to "comments" for that file with something like "<br>MD5 : 238428478743" ... for example.
Title: Re: Additional Comments (descript.ion)
Post by: rejetto on May 29, 2010, 05:21:08 PM
sorry for the late reply.
so, your problems comes with manual edit of the comment? what's the problem exactly?
if you want to keep the comment and the md5 separately, it's easy.
just don't put the MD5 in the comment, and instead save it to a dedicated file.
then you can just make a little change to the template to display the MD5 after the comment.
Title: Re: Additional Comments (descript.ion)
Post by: vbn on July 05, 2010, 06:00:20 AM
how can I accomplish this easily....I have my automation software which creates a .md5 with same name as the file when its uploaded via HFS or FTP...

In the listing I want to display this md5 against each of the file......

so ABC.rar has a corresponding ABC.md5 ... now in the template how can I read each md5 on traversal and display next to comments ?
Title: Re: Additional Comments (descript.ion)
Post by: Mars on July 05, 2010, 10:48:25 AM
in the menu , you have "fingerprints" which is used to create md5, you can disable it

we are working with the event "upload completed" in the file hfs.events (HFS: Event scripts (http://www.rejetto.com/wiki/index.php/HFS:_Event_scripts)  (by Topic) (http://www.rejetto.com/forum/index.php/topic,6845.msg1042396.html#msg1042396)).

Quote
[upload completed]
{.delete|%item-resource%.md5.}
{.save|%item-resource%.md5|{.md5 file|%item-resource%.}.}
{.append|%item-resource%.md5|{.chr|13|10.}|add some text as new line inside the md5.}

then every upload generate and md5 file , by deleting the previous file md5,

after you have to extract what is necessary to your main template

insert section [file]

{.load|%item-resource%.md5.}

and manage the information;

answer your question?  ;)
Title: Re: Additional Comments (descript.ion)
Post by: rejetto on July 06, 2010, 11:44:18 AM
the md5 for abc.rar must be abc.rar.md5, not abc.md5

you can put this in the template  {.load|%item-resource%.md5.}
as mars reported
Title: Re: Additional Comments (descript.ion)
Post by: vbn on July 07, 2010, 05:20:11 AM
Aha...I think the filename was what made me cry :(

Anyways will try this now asap :)