Skip to content

Commit

Permalink
Started on delete support, updated README, removed unused start.sh file
Browse files Browse the repository at this point in the history
  • Loading branch information
ngerakines committed Aug 17, 2008
1 parent edc1242 commit 14d3c76
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
10 changes: 7 additions & 3 deletions README
Expand Up @@ -72,9 +72,9 @@ START-UP
1. Update the ebin/s3images.app file and set the domain, amazon s3 access
information and s3 bucket.
2. Build the project (`make`)
3. Start the erlang node (`./start.sh`)
4. Start the application and its dependancies.
`1> [application:start(X) || X <- [inets, yaws, crypto, mnesia, s3images]].`
3. Start the erlang node and application with `make start`.

Optional: Connect with a control erlang node via `make start-ctl`.

ELIB

Expand All @@ -94,6 +94,10 @@ CAVEATS / NOTES / KNOWN ISSUES

CHANGES

2008-08-17 ngerakines
- Sprinkled a few try/catch calls to catch app failures (yay fault-tolerance!)
- Added `make start` and `make start-ctl` Makefile commands.

2008-07-14 ngerakines
- Added a config option to point to a different template delegate.

Expand Down
1 change: 0 additions & 1 deletion src/image_detect.erl
Expand Up @@ -74,4 +74,3 @@ parse_jpeg(<<_,Rest/binary>>, Pos) -> parse_jpeg(Rest, Pos).
mime_type(gif) -> "image/gif";
mime_type(png) -> "image/png";
mime_type(jpeg) -> "image/jpeg".

6 changes: 5 additions & 1 deletion src/s3images_util.erl
Expand Up @@ -22,7 +22,7 @@
%% OTHER DEALINGS IN THE SOFTWARE.
-module(s3images_util).

-export([write_file/3, guid/0, s3now/0]).
-export([write_file/3, delete_file/2, guid/0, s3now/0]).

-include("s3images.hrl").

Expand All @@ -33,6 +33,10 @@ write_file(Filename, {ImageType, _, _}, Bucket) ->
_ -> error
end.

delete_file(Filename, Bucket) ->
catch s3:delete_object(Bucket, Filename);
end.

guid() ->
<<I:160/integer>> = crypto:sha(term_to_binary({make_ref(), now()})),
erlang:integer_to_list(I, 16).
Expand Down
2 changes: 0 additions & 2 deletions start.sh

This file was deleted.

0 comments on commit 14d3c76

Please sign in to comment.