Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added some code example

  • Loading branch information...
commit 5a63868a18c3497692b5507d28422b4cf6cc00c8 1 parent 0ab83e6
@0i0 authored
Showing with 25 additions and 1 deletion.
  1. +25 −1 README.md
View
26 README.md
@@ -5,4 +5,28 @@ A class that wraps amazon ios sdk with callbacks and progress
The amzon sdk is not icluded here, I assume you have it
-there is no mime type detection, you'll need an external lib for this
+there is no mime type detection, you'll need an external lib for this
+
+If you still want to use it
+
+include like this
+```objC
+#import "CLUploadService.h"
+#import "AmazonS3Client.h"
+```
+
+Use it like this
+```objC
+CLUploadService *uploadService = [[CLUploadService alloc]init];
+
+[uploadService uploadFileWithData:imgData
+ fileName:fileName
+ progress:^(NSInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {
+ CGFloat precent = (totalBytesWritten / (totalBytesExpectedToWrite * 1.0f) * 100);
+ NSLog(@"Uploaded:%f%%", precent);
+} success:^(id responseObject) {
+ NSLog(@"Upload Completed");
+} failure:^(NSError *error) {
+ NSLog(@"Error: %@", error);
+}];
+```
Please sign in to comment.
Something went wrong with that request. Please try again.