Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

contentType property on PutAttachmentOperation is ignored #108

Closed
tfrank64 opened this issue Jul 13, 2016 · 10 comments
Closed

contentType property on PutAttachmentOperation is ignored #108

tfrank64 opened this issue Jul 13, 2016 · 10 comments
Labels
Milestone

Comments

@tfrank64
Copy link
Contributor

Please include the following information in your ticket.

  • SwiftCloudant version(s) that are affected by this issue. All
  • Swift version(s) 06/06
  • Platform(s) Mac
  • A small code sample that demonstrates the issue.

When the operation executes, it always falls back to the default implementation of contentType which returns "application/json". The effect of this bug now is that every attachment is of type "application/json". This seems to happen because you aren't adopting the same property created in CouchOperation since that one is just a String, but the one in PutAttachment is an optional String. I got around this issue locally by making contentType a String

public var contentType: String = ""

and making the validate check look like this:

    if contentType == "" {
        return false
    }
@rhyshort rhyshort added the bug label Jul 14, 2016
@rhyshort rhyshort added this to the 0.4.0 milestone Jul 14, 2016
@rhyshort
Copy link
Member

hmmm, I think we can fix this properly as part of the API review with the API guidelines in mind as part of issue #96. We'll need to determine if its a fix that we should back port or not.

@tfrank64 Do you know how long you'll be tied to 06/06 snapshot?

@tfrank64
Copy link
Contributor Author

@rhyshort Probably the next couple weeks. After that, we will shift to the 06/20 snapshot. The timing is somewhat based on the projects we depend on.

@rhyshort
Copy link
Member

@tfrank64 This bug will be cleaner to fix as part of the work in #96 so I propose that we don't back port it to 0.3.x (along with _all_docs support) with the aim of having both included in 0.4.0 which will support the 20th June trunk snapshot, any thoughts?

@rolivieri
Copy link

@rhyshort Thanks for the update! Waiting for 0.4.0 could work for us. Do you guys have en ETA for the 0.4.0 release that supports the Swift 06-20 binaries?

@rhyshort
Copy link
Member

Hopefully we can do it this week, but if not it will be early next week.

@rolivieri
Copy link

@rhyshort Thanks for the update. That's good news. Look forward to the release.

@tfrank64
Copy link
Contributor Author

@rhyshort Just checking in, are we still on track for a release early this week?

@rhyshort
Copy link
Member

I'm not sure, but it doesn't look like it right now, best to keep an eye on #109 once we have finished reviewing and merged it, we should be able to cut a release. Assuming there is nothing else in the backlog that must go into it.

@rhyshort
Copy link
Member

Now that #96 is resolved this should be fixed.

@tfrank64
Copy link
Contributor Author

Thanks for the fix, v0.4 is integrated in our project and is working well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants