I need to generate boundary for a multi-part upload
post << "--#{BOUNDARY}\r\n"
post << "Content-Disposition: form-data; name=\"datafile\"; filename=\"#{filename}\"\r\n"
post << "Content-Type: text/plain\r\n"
post << "\r\n"
post << file
post << "\r\n--#{BOUNDARY}--\r\n"
The BOUNDARY need to be a random string (not present in the file).
In rails, I could do SecureRandom.hex(10)
Who can I do it without loading activesupport?