rejetto forum

move files after upload on location that is set with selected the listbox

0 Members and 1 Guest are viewing this topic.

Offline gogi1000

  • Occasional poster
  • *
    • Posts: 44
    • View Profile
ok for

{.if| {.length|%user%.} |{: {.append| %folder-resource%\{.^movedto.}\hfs.comments.txt |{.filename|%item-resource%.}=%folder%{.^movedto.}, {.time|%item-resource%|format=dd/mm/yyyy.}, %user%
/append.} :}/if.}

but how everytime when new file uploaded i make the write in file hfs.comment.txt in new line like this format

text.txt,/test/bilans stanja,19/07/2016, user
blabla.txt,/test/statut,19/07/2016,user1
.......

thanks


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
is it only for personal information usage or for displayed in web page

which is stored in hfs.commands.txt, is available through the variable %item-comment%, each line of the file requires a special layout that has the form

filename = upload-success how

if you want to be added in comment the following content:
text.txt,/test/bilans stanja,19/07/2016, user
blabla.txt,/test/statut,19/07/2016,user1

which is appended in hfs.commands.txt must be

text.txt=text.txt,/test/bilans stanja,19/07/2016, user
blabla.txt=blabla.txt,/test/statut,19/07/2016,user1


{.append| %folder-resource%\{.^movedto.}\hfs.comments.txt |{.filename|%item-resource%.}={.filename|%item-resource%.},%folder%{.^movedto.}, {.time|%item-resource%|format=dd/mm/yyyy.}, %user%
/append.}


Offline gogi1000

  • Occasional poster
  • *
    • Posts: 44
    • View Profile
how show time near date in format dd/mm/yyyy hh/mm?
i have a situation the first write is ok, but if i want upload one fileafter the previous entry  in hfs.comment.txt  i have two the write the previous and the second. how i disable this situation



Offline gogi1000

  • Occasional poster
  • *
    • Posts: 44
    • View Profile
i solved problem with format time but i cannot solve a problem:

when i upload the first file i receive picture attached with name first.jpg, but when i back on upload second file i receive picture attached with name second.jpg. in hfs.comment.txt i receive duplicate the write like

text.txt=text.txt; /test/statut; 22/07/2016;14:57:29; test
text.txt=text.txt=text.txt=text.txt; /test/bilans stanja; 22/07/2016;14:58:46; test
text1.xlsx=text1.xlsx; /test/bilans stanja; 22/07/2016;14:58:46; test


my code in diff template is

[upload-success]
{.inc|ok.}
<br/>
{.set|movedto|{.postvar|{.postvar|metodologija.}.}/set.}
{.switch|{.postvar|metodologija.}|,|
  1,2,3,4|{:{.mkdir|{.filepath|%item-resource%.}\{.^movedto.}\.}{.move|%item-resource%|%folder%{.^movedto.}/.} <p>Uspesno ste prebacili fajl. Fajl je premesten na lokaciju %folder%{.^movedto.}/ :}|
   0|{:<p>no move has been performed with this action selected:}| {:{.delete|%item-resource%.}<p>Niste izabrali tip dokumenta:}
/switch.}

{.append| %folder-resource%\hfs.comments.txt |{.filename|%item-resource%.}={.filename|%item-resource%.}; %folder%{.^movedto.}; {.time|%item-resource%|format=dd/mm/yyyy;hh:nn:ss.}; %user%
/append.}
« Last Edit: July 22, 2016, 01:09:40 PM by gogi1000 »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
because you missed something important

{.append| %folder-resource%\{.^movedto.}\hfs.comments.txt| .......

*********************************************************************

{:{.delete|%item-resource%.}<p>Niste izabrali tip dokumenta:}

It's not a good idea to delete file after upload, it is better to force the user to make a choice from the javascript before it can send files, rather than destroy them once transferred, imagine what happens if the transfer occupies several hundred megabytes.


remember that the HFS.COMMENTS.TXT file is yours to manage, it can happen that lines carrying identical file names exist, but it will always be with the last played for the file that the comment will be in use
*********************************************************************