pCloud / pcloud-sdk-swift

The official pCloud Swift SDK for iOS and macOS for integration with the pCloud API.
MIT License
22 stars 7 forks source link

If uploaded file name contains "&" character all further symbols are ignored #4

Closed Alex-C-Eltima closed 4 years ago

Alex-C-Eltima commented 4 years ago

Hello,

We are trying to use your SDK to include pCloud support into our CloudMounter app. Upon file upload using the following method of PCloudClient class

func upload(fromFileAt path: URL, toFolder folderId: UInt64, asFileNamed name: String, withModificationDate date: Date? = nil) -> UploadTask

if the initial file name contains "&" character, all subsequent symbols are cut off in the name of uploaded file.

Kindly take a look.

tmpit commented 4 years ago

Hey, I'm looking into it. It seems I am relying on URLComponents.query property for encoding when it comes to upload tasks, but this does not work for valid URL characters (such as "&") within query item values.

tmpit commented 4 years ago

Will submit a new version later today.

Alex-C-Eltima commented 4 years ago

Hey, thanks, all is working correctly now