We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f4402c commit 5876faaCopy full SHA for 5876faa
lib/tasks/mesh.rake
@@ -40,6 +40,19 @@ namespace :mesh do
40
41
response = MESH.connection.put("inbox/#{message}/status/acknowledged")
42
43
+ puts response.body
44
+ warn response.status unless response.status == 200
45
+ end
46
+
47
+ desc "Send a file to a mailbox via MESH"
48
+ task "send_file", %i[to file] => :environment do |_, args|
49
+ to = args[:to]
50
+ file = args[:file]
51
52
+ data = File.read(file)
53
+ response = MESH.send_file(to:, data:)
54
55
56
warn response.status unless response.status == 200
57
end
58
0 commit comments