Post
Topic
Board Announcements (Altcoins)
Re: NXT :: descendant of Bitcoin - Updated Information
by
coolmist
on 20/01/2014, 03:47:24 UTC

I am sorry, but we usually do not download apps from new users here. Expert must look at your app first to proof you aren't a hacker.

Here's the html to upload a file to a NXT message: https://gist.github.com/fermentNXT/8514468.

1. Download gist and copy to nxt/webapps/root/send-file.html.
2. Open http://localhost:7875/send-file.html
3. Send a file! Torrents or whatever.

You can view the file at https://localhost:7875/message.html. If people like, I can add the ability to save.

nxt: 4915862015826193000




Code:
if (file.type.match(textType) && file.size<1000)


...this will only upload small files. Torrent files are around 9kb.

I mitigated the limit by...

Code:

        set thelist to "0123456789ABCDEF"
        set hexvalue to ""
        
        repeat with i in ciphertext
            
            set theAscii to ASCII number of i
            set hexvalue to hexvalue & character (theAscii div 16 + 1) of thelist & character (theAscii mod 16 + 1) of thelist
            
        end repeat
        
        set finalText to (hexvalue as text)
        
        set messageLength to the length of finalText
        
        set var_a to messageLength / 4
        
        set var_b to var_a / 200
        
        set iterations to round var_b rounding up
        
        set counter to 1
        repeat iterations times
            
            if messageLength is less than 800 then
                
                set charnumberalpha to 1
                set charnumberbeta to messageLength
                
                else
                
                set charmaximum to messageLength
                
                if  counter is equal to iterations then
                    
                    set charnumberalpha to 1 + 800 * (counter - 1)
                    set charnumberbeta to charmaximum
                    
                    else
                    
                    set charnumberalpha to 1 + 800 * (counter - 1)
                    set charnumberbeta to 800 + 800 * (counter -1)
                    
                end if
                
                
            end if
            
            set messageFinal to (text charnumberalpha thru charnumberbeta of finalText)
            
            if counter is less than 10 then
                set identifierLength to 1
                
                else
                
                set identifierLength to the length of counter
                
            end if
            
            set completeMessage to identifierLength & "000" & counter & "000" & messageFinal
            
            set urlMassive to  "http://localhost:7874/nxt?requestType=sendMessage&secretPhrase=" & (stringValue() of secretPhrase) & "&recipient=" &  (stringValue() of accountReceiver) & "&fee=" & (stringValue() of messageFee) & "&deadline=1440" & "&message=" & completeMessage
            
            do shell script "open " & (quoted form of urlMassive)
            
            set counter to counter + 1
        end repeat

EDIT: I don't want the bounty BTW.