-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
76 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
class ErrorsController < ApplicationController | ||
def not_found | ||
render status: 404 | ||
render status: :not_found | ||
end | ||
|
||
def internal_server_error | ||
render status: 500 | ||
render status: :internal_server_error | ||
end | ||
end |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,8 @@ | |
</span> | ||
|
||
<span class="flex-1"> | ||
curl -X POST -F "[email protected]" https://datadeaddrop.com/drop | ||
curl -X POST -F "upload[data][email protected]" | ||
https://datadeaddrop.com/u.json | ||
</span> | ||
</span> | ||
|
||
|
@@ -117,7 +118,8 @@ | |
</span> | ||
|
||
<span class="flex-1"> | ||
curl -O https://datadeaddrop.com/grab/your-easy-to-remember-url | ||
curl -L http://datadeaddrop.com/d/your-secret-url.json > | ||
your-file.txt | ||
</span> | ||
</span> | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
json.error "Not found" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
json.error "Not found" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
json.extract! upload, :id, :path, :data, :expiry, :remaining_uses, :previewed, :created_at, :updated_at | ||
json.url upload_url(upload, format: :json) | ||
json.data url_for(upload.data) | ||
json.extract! upload, :key, :expiry, :remaining_uses, :created_at | ||
json.url Rails.application.routes.url_helpers.download_url(upload) | ||
json.name upload.data.filename.to_s |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
LiprxKVi8XEhjTywr2c4tXgDb8853hoHtCu7MBHqCV3eS/1H26OvLy+MWGF3bPGBqB+u0woHD5tpJ5d5nXc+jydyx2u9XxN6ozM8Ttg3rfiTW8fv5Ld2aMp5f6s8RgWUxt9wiT1PZmmVn5Bty8iOqVmjFZPIRh+mzRED7y9ZDENn9bq3r0s28EmH883FoqAzpVfbSFUr+cHhW3Ak7lyPMp27ZBXx0EmR7n+kVNz6n7qZtN/yhc0PR8X9wYlau7nAtwM2lAZYfOUVRPH9pVYwNwxX46D+tAqFyhXN94E1wMaQ2Jbtuot53RfChWcDFvcLFeDJh0bNOIe7j368vJ8qeEqNPZ//sneeTA8kA9MzkSf5PO1sGoIm/SJ7XeRtDNw2m9gzeNILjRpecIWYbSK6hoPJMIym--zZUM4heW6d0PimS4--uAWAPX3UFL+FJGL22zo9Kw== | ||
4sS2+n0Ick8STxrOAIIOaq5+xD/lPThoQJWY7MUF3v5G4nN1Uc0rpgRVoDazsEEJ0S2uK9rLjGpxX9LoPRZCvGSXMp4MUCUKe5kbR5TLcJvT/wNPM21yM6VTHkcJGBKtrqwx837Ds/IFSoFMEoZ2ny9RV1Zj3rWym73ePkJsRLKeLJ/5Vlw6uGR09xxjkR5BtDMBjGISl2xPjd1Wv5f9DjAa2b6NCDxbAYmlP/bjyWlxhIQp6hihzWuqK2C/7Osc+kgop0LtKdJTSo/4Cz65g2clR34kn+QwpV4VjK1QlUZsL8quG8osR63v2NNOgwTQe1uw4lWYAeWyB8OFwCW4hPePlxlrfAspP7m2GAAldfu5VfdxDjd7buYwpAxSV5hhGMc+xAASlkmjMAbudGgUODR/p77z--XBTbR6JVHGtqn2nr--q+7ZZYzW7tc976r8+RfASQ== |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ONYihcJE6z85Sr3c+PSS16urjpkmxk8OajAE4WuusfIo8s5YnSrtyn7qkq8XZ3Qn73F1o+zatPGsQb2rfV3TmR9g5BfSxcJcwWTdoSRjS7QppMR7EiB5PP7O3wd5N3bG39pZ7qTHrzVg08AGrEL6yvs+RXTgUR2QFHsDoIJj3YlkwIBer8byCr9nC9nt3xSpqhzbxmdhMmd+KTsCFL/OlXdcOJvOwxHzhPUj0rImHk+yD5evHVac0gSule7ucbbfAVvOxZOm15J66k3qR+eRv+f1BKG4WjlwBdPXqmBA5TFOfU3WiQ/stfHJww+AuTH53b3cGKxoEHgycW7WEDzolxwHkur7NEC737vsR/0dW4X1eyYUsNVviOFeRGIvxPr85vC92Mf3yY5VmVZNBvn3WCD7kHYd--UjeTagvsRgXeDVxp--x0gK9KAI8+md42EmZZdsdQ== | ||
Xfq7VdD6WwiG6rq1lNFt0FoUu3e15SGkQ7QQJkHfzq/E+BoXVUwHHEZVElwemmWVumiHkL5MyX5qr0/pbu2BtpDt8HmFtyOWrLvql1vIGmPQkTxHpFjq6fh5XZ6lrzoTa2CAUeeWXuzVtab1N5itDtf4IppWPHJ7+cXf895cRrVbIA0jt906O8tjCjnvgeoA6YQgGebdp2PW93WfAzdnhgM37w8yeU+fcxxKRi095FQ9VZ7s25/f8yS5VAM0GBV+aS1j7b+y0qycToOc3huF9YE1aRdxNmrGk21bXdJ4ylcpryPNoFrXJGTpo1QZ9Nx8d21sr3cX3V5AanTGIXquqn9Gz+6+w8RVAldmx8dcmJuvW7XvFZuvz8McNWsJrlUZkQavSMMUEV/7t7datMim0T4wW1aQ+4BfsbvDEm2Tn0HmTja00mbncBSaChJwAiEnYTsdbp6evU3PmIp9qUGAr5A5eYrr--lOdUxq5SatVrCS+d--CF7k2/VNtrXfUl9I9lJWFg== |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
hosts = { | ||
development: 'localhost:3000', | ||
production: 'datadeaddrop.com' | ||
}.freeze | ||
|
||
Rails.application.routes.default_url_options[:host] = hosts[Rails.env.to_sym] |
This file contains 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
This file contains 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