Fix iOS Share extension alert message when file size is larger than allowed (#3792)

This commit is contained in:
Elias Nahum 2020-01-10 07:41:48 -03:00 committed by GitHub
parent a17983c1e4
commit 1e42a87826
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -175,6 +175,7 @@ export default function configureAppStore(initialState) {
const entities = {
...state.entities,
general: {
...state.entities.general,
credentials: {
url,
},

View file

@ -82,11 +82,13 @@ import os.log
guard let identifier = session.configuration.identifier else {return}
do {
let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as! NSDictionary
let fileInfos = jsonObject.object(forKey: "file_infos") as! NSArray
if fileInfos.count > 0 {
let fileInfoData = fileInfos[0] as! NSDictionary
let fileId = fileInfoData.object(forKey: "id") as! String
UploadSessionManager.shared.appendCompletedUploadToSession(identifier: identifier, fileId: fileId)
if jsonObject.object(forKey: "file_infos") != nil {
let fileInfos = jsonObject.object(forKey: "file_infos") as! NSArray
if fileInfos.count > 0 {
let fileInfoData = fileInfos[0] as! NSDictionary
let fileId = fileInfoData.object(forKey: "id") as! String
UploadSessionManager.shared.appendCompletedUploadToSession(identifier: identifier, fileId: fileId)
}
}
} catch {
if #available(iOS 12.0, *) {