ϢχʔΫͳID func upload(fileURL: URL, identifier: String) { let config = URLSessionConfiguration.background(withIdentifier: identifier) let session = URLSession(configuration: config, delegate: self, delegateQueue: nil) let request = makeRequest(with: fileURL) let task = session.uploadTask(with: request, fromFile: fileURL) task.resume() } // 1: URLSessionConfigurationΛ࡞ // 2: URLSessionΛ࡞ // 3: URLRequestΛ࡞(ϦΫΤετύϥϝʔλΛΈཱͯΔͨΊϚϧνύʔτͳURLRequestΛ࡞ͬͯฦ͢) // 4: URLSession͔ΒUploadTaskΛऔΓग़͢ʢΞοϓϩʔυ͢ΔϑΝΠϧͷॴ͕ඞཁʣ Ξοϓϩʔυͷखଓ͖