You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Documentation/REST API.md
+28-1
Original file line number
Diff line number
Diff line change
@@ -24,12 +24,39 @@
24
24
25
25
## Initialization
26
26
27
+
Create Uploadcare project in the [dashboard](https://app.uploadcare.com/?utm_source=github&utm_medium=referral&utm_campaign=uploadcare-swift) and copy its API keys from there.
28
+
27
29
REST API requires both public and secret keys:
28
30
29
31
```swift
30
-
let uploadcare =Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY", secretKey: "YOUR_SECRET_KEY")
Keep in mind that since Uploadcare is not a singleton. You should store a strong reference (as an instance variable, for example) to your Uploadcare object or it will get deallocated.
59
+
33
60
## List of files ([API Reference](https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/filesList)) ##
Copy file name to clipboardexpand all lines: Documentation/Upload API.md
+32-1
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,43 @@
14
14
15
15
## Initialization
16
16
17
+
Create Uploadcare project in the [dashboard](https://app.uploadcare.com/?utm_source=github&utm_medium=referral&utm_campaign=uploadcare-swift) and copy its API keys from there.
18
+
17
19
Upload API requires only a public key:
18
20
19
21
```swift
20
-
let uploadcare =Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY")
Keep in mind that since Uploadcare is not a singleton. You should store a strong reference (as an instance variable, for example) to your Uploadcare object or it will get deallocated.
53
+
23
54
## File upload ##
24
55
Uploadcare provides a simple method that will handle file upload. It decides internally the best way to upload a file (to use direct or multipart upload).
Keep in mind that since Uploadcare is not a singleton. You should store a strong reference (as an instance variable, for example) to your Uploadcare object or it will get deallocated.
111
+
85
112
## Using Upload API
86
113
87
114
Check the [Upload API documentation](https://github.com/uploadcare/uploadcare-swift/blob/master/Documentation/Upload%20API.md) to see all available methods.
0 commit comments