cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: uploaded files don't exist in the folder iOS Swift3

uploaded files don't exist in the folder iOS Swift3

dbyy
Explorer | Level 3

I'm trying to upload a csv file in Swift3. 

The method looks working but the can't find the file in the folder.

The following is the log.

 

2018-07-16 01:41:09.057380+0900 MultiDirectionCollectionView[4231:1307144] dnssd_clientstub write_all(33) DEFUNCT

{

    "client_modified" = "2018-07-15T16:41:07Z";

    "content_hash" = a5c998a592ab3eae63b97d8f56024c1403c4ac6a2512740b318a3ce71789213b;

    id = "id:rk7x4l2SWGAAAAAAAAAADA";

    name = "FromiOS.csv";

    "path_display" = "/FromiOS.csv";

    "path_lower" = "/fromios.csv";

    rev = e58109260;

    "server_modified" = "2018-07-15T16:41:08Z";

    size = 435;

}

2018-07-16 01:41:09.731898+0900 MultiDirectionCollectionView[4231:1307095] WF: _userSettingsForUser mobile: {

    filterBlacklist =     (

    );

    filterWhitelist =     (

    );

    restrictWeb = 1;

    useContentFilter = 0;

    useContentFilterOverrides = 0;

    whitelistEnabled = 0;

}

 

 

//code

 

 

            let path2 = "/" + str + ".csv"

            

            /*

            _ = DropboxClientsManager.authorizedClient?.files.upload(path: path2 , input: payload! )

                .response { response, error in

                    if let response = response {

                        //print(response)

                    } else if let error = error {

                        // print(error)

                    }

                }

                .progress { progressData in

                    //print(progressData)

            }

             */

            

            let request = DropboxClientsManager.authorizedClient?.files.upload(path: path2, mode: Files.WriteMode.add, autorename: true, clientModified: Date(), mute: true, input: payload!).response { response, error in

                if let response = response {

                    print(response)

                } else if let error = error {

                     print(error)

                }

                }

                .progress { progressData in

                    print(progressData)

            }

            

            

Thanks.

2 Replies 2

Greg-DB
Dropbox Staff
That response does indicate that the file was successfully uploaded. There are a few things to check to make sure you're looking for it in the right place:

- If your app is registered for the "app folder" permission, the files will be uploaded in a special "app folder" created for your app. If you are using that permission, make sure you're looking in that folder. It will be located inside the "/Apps" folder in your account, if your account is set to English, or a corresponding translation for other localizations.
- Make sure you're looking in the same account as you're connected to via the API.
- If you're looking via a desktop filesystem, make sure the desktop client is syncing properly.

dbyy
Explorer | Level 3

Thank you for your help.

It's working now.

I didn't add the re-direct code in the appdelegate class.

 

 

Need more support?