質問編集履歴

1

誤字

2020/02/05 01:27

投稿

shun--
shun--

スコア5

test CHANGED
File without changes
test CHANGED
@@ -43,6 +43,24 @@
43
43
  }
44
44
 
45
45
 
46
+
47
+ func uploadAction(_ file: String) {
48
+
49
+ print(file)
50
+
51
+ if let documentsDir = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).last {
52
+
53
+ let testFilePath = documentsDir.appendingPathComponent(file).path
54
+
55
+ drive?.uploadFile("20200204", filePath: testFilePath, MIMEType: "image/png") { (fileID, error) in
56
+
57
+ print("Upload file ID: (fileID); Error: (error?.localizedDescription)")
58
+
59
+ }
60
+
61
+ }
62
+
63
+ }
46
64
 
47
65
  ```
48
66