I'm writing a plugin that should act as some kind of torrent-tracker. The plan is to make it easy to just upload a torrent by using regular attachments, and after this, a "tracker" should automatically handle the attached file as a torrent. The way I'm doing this is to read the filedata when a file is uploaded, just to see if the file really is a torrent. I also need to read the data to get the hash out of the file.
The problem is that I can't find out exactly where to read the filedata received from the uploader. Currently I use newattachment_attach, just because of the hash/attachmentid but I can't find any trace of the data and I really looked everywhere for it. The code I'm writing is based on
Torrentbits old tracker to get what I want out from it, but the files there are handles differently...
Can someone help? Where do I find the attachmentdata? I'm frustrated!