Created
July 1, 2013 17:39
-
-
Save chintanparikh/5902921 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'docsplit' | |
require './sinatra/faxattach_helpers' | |
class FaxAttach < Sinatra::Base | |
helpers Sinatra::FaxAttachHelpers | |
get '/*' do | |
"hello world" | |
status 405 | |
end | |
put '/*' do | |
status 405 | |
end | |
patch '/*' do | |
status 405 | |
end | |
delete '/*' do | |
status 405 | |
end | |
options '/*' do | |
status 405 | |
end | |
link '/*' do | |
status 405 | |
end | |
unlink '/*' do | |
status 405 | |
end | |
post '/process' do | |
path = params[:path] | |
begin | |
debugger | |
file = test_download path | |
rescue | |
status 404 | |
end | |
debugger | |
code = extractCode file | |
code | |
end | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --data "path=https://aidin.s3.amazonaws.com/aidin/staging/attachments/faxattach/4yhTuv1W3qRCSA1M2?AWSAccessKeyId=AKIAJPBOMKHDQ5WNJM3Q&Expires=1373295474&Signature=2meFoWGPo4XFC1bPHjmxADd7FDo%3D" localhost:4567/process |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment