Compare commits

..

No commits in common. "7e78a9245a1f93178eba00b2d6bb551c9cd817d4" and "35be009fdfe9015a06dd147b25765df2fecbe542" have entirely different histories.

2 changed files with 2 additions and 6 deletions

View File

@ -11,8 +11,6 @@ require 'sqlite3'
require 'jwt'
require 'dotenv/load'
set :bind, '0.0.0.0'
TOKEN_SECRET = ENV['JWT_SECRET_KEY']
puts TOKEN_SECRET
initialize_database

View File

@ -78,17 +78,15 @@ uri = URI.parse('https://auth.roysathome.net/upload')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
puts 'Enter message to send:'
message = gets
request = Net::HTTP::Post::Multipart.new(
uri.path,
'file' => UploadIO.new(StringIO.new(message), 'application/octet-stream', 'example.txt')
'file' => UploadIO.new(StringIO.new(file_content), 'application/octet-stream', 'example.txt')
)
request['Authorization'] = "Bearer #{authentication_token}"
# Send the request
#puts "Sending file of size #{(File.size('./example.txt') / 2**20).round(2)} MB"
puts "Sending file of size #{(File.size('./example.txt') / 2**20).round(2)} MB"
response = http.request(request)
#puts response.code