> There is no way to load the content of the uploaded file directly into a
> blob or text variable (given it is text content), which would be easier?

Wait... you mean you have been writing more than one line of code all this 
time? I can't believe you haven't used the command:

'do everything for me (and read my mind while you are at it)'

Sorry, I couldn't resist!  :D

Most of the time when people upload a file, it is meant to be retained. 
Otherwise why bother with an upload instead of a text field in a form, if you 
know it is going to be plain text?

Feel free to make a feature request on the issue tracker, but don't wait for it 
to be implemented.

In the meantime you will have to suffer the unbearable torture of writing 3 
extra lines of code:

copy upload($ref; $path)
document to blob($path; $blob)
blob to text($blob; UTF8 Text without length; 0; get upload size($ref))
delete document($path)

Of course you will have to hope the user hasn't done anything stupid or 
malicious by uploading binary content disguised as text or by uploading a huge 
file which will eat all of the server's memory and cause it to freeze/crash 
when you load 2 copies of it into memory (1 for the blob, 1 for the converted 
text).

Regards,

   Aparajita
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoy.org

_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/

Reply via email to