File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
FilestackSDK/Internal/Operations Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -123,12 +123,6 @@ private extension UploadOperation {
123123 func executeStartOperation( completion: @escaping ( StartUploadOperation . Result ) -> Void ) {
124124 guard !isCancelled else { return }
125125
126- var filename = options. storeOptions. filename ?? uploadable. filename ?? " "
127- var mimeType = options. storeOptions. mimeType ?? uploadable. mimeType ?? " "
128-
129- if filename. isEmpty { filename = UUID ( ) . uuidString }
130- if mimeType. isEmpty { mimeType = " text/plain " }
131-
132126 guard let filesize = uploadable. size, filesize > 0 else {
133127 completion ( . failure( . custom( " The provided uploadable is either empty or cannot be accessed. " ) ) )
134128 return
@@ -139,6 +133,12 @@ private extension UploadOperation {
139133 return
140134 }
141135
136+ var filename = options. storeOptions. filename ?? uploadable. filename ?? " "
137+ var mimeType = options. storeOptions. mimeType ?? uploadable. mimeType ?? " "
138+
139+ if filename. isEmpty { filename = UUID ( ) . uuidString }
140+ if mimeType. isEmpty { mimeType = " text/plain " }
141+
142142 let startOperation = StartUploadOperation ( config: config,
143143 options: options,
144144 reader: reader,
You can’t perform that action at this time.
0 commit comments