You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Nestor Urquiza <ne...@gmail.com> on 2013/01/23 23:51:09 UTC

Attachment still accessible after being deleted

Hellow guys,

Can anyone help here please. I believe I am not deleting the
attachment correctly?

1. I delete a document as per documentation:
$ curl -k -X DELETE
"https://user:password@example.com:6984/db/sample.pdf/attachment/?rev=1-adb7b6f2e32d73758dfa16966c1caef9"
{"ok":true,"id":"sample.pdf","rev":"2-87988b99af60e2f7cb9022b65b7565d5"}

2. I check for the attachment and indeed it is not there:
$ curl -k -X GET
"https://user:password@udesktop3.sample.com:6984/db/sample.pdf/attachment"
{"error":"not_found","reason":"Document is missing attachment"}

3. Yet from futon (or the equivalent below) the attachment is downloaded?
$ curl -O -k -X GET
"https://user:password@udesktop3.sample.com:6984/db/sample.pdf/sample.pdf"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  163k  100  163k    0     0  1707k      0 --:--:-- --:--:-- --:--:-- 1817k

Thanks,
-Nestor

Re: Attachment still accessible after being deleted

Posted by Nestor Urquiza <ne...@gmail.com>.
Hi Robert,

My bad. I just realized what you meant. I took "attachment" as literal
where the documentation was referring to the actual attachmentName.

This is no longer an issue.

Thanks!
-Nestor

On Wed, Jan 23, 2013 at 8:21 PM, Nestor Urquiza
<ne...@gmail.com> wrote:
> Hi Robert not sure what you mean.
>
> The url showing document_id/attachment is just the way you access the
> attachment of that document_id right? At least that is my
> understanding from
> http://wiki.apache.org/couchdb/HTTP_Document_API#Attachments
>
> Thanks!
> - Nestor
>
>
>
> On Wed, Jan 23, 2013 at 6:28 PM, Robert Newson <rn...@apache.org> wrote:
>> Do you have an attachment called 'sample.pdf' in addition to one
>> called 'attachment'?
>>
>> B.
>>
>> On 23 January 2013 22:51, Nestor Urquiza <ne...@gmail.com> wrote:
>>> Hellow guys,
>>>
>>> Can anyone help here please. I believe I am not deleting the
>>> attachment correctly?
>>>
>>> 1. I delete a document as per documentation:
>>> $ curl -k -X DELETE
>>> "https://user:password@example.com:6984/db/sample.pdf/attachment/?rev=1-adb7b6f2e32d73758dfa16966c1caef9"
>>> {"ok":true,"id":"sample.pdf","rev":"2-87988b99af60e2f7cb9022b65b7565d5"}
>>>
>>> 2. I check for the attachment and indeed it is not there:
>>> $ curl -k -X GET
>>> "https://user:password@udesktop3.sample.com:6984/db/sample.pdf/attachment"
>>> {"error":"not_found","reason":"Document is missing attachment"}
>>>
>>> 3. Yet from futon (or the equivalent below) the attachment is downloaded?
>>> $ curl -O -k -X GET
>>> "https://user:password@udesktop3.sample.com:6984/db/sample.pdf/sample.pdf"
>>>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>>>                                  Dload  Upload   Total   Spent    Left  Speed
>>> 100  163k  100  163k    0     0  1707k      0 --:--:-- --:--:-- --:--:-- 1817k
>>>
>>> Thanks,
>>> -Nestor

Re: Attachment still accessible after being deleted

Posted by Nestor Urquiza <ne...@gmail.com>.
Hi Robert not sure what you mean.

The url showing document_id/attachment is just the way you access the
attachment of that document_id right? At least that is my
understanding from
http://wiki.apache.org/couchdb/HTTP_Document_API#Attachments

Thanks!
- Nestor



On Wed, Jan 23, 2013 at 6:28 PM, Robert Newson <rn...@apache.org> wrote:
> Do you have an attachment called 'sample.pdf' in addition to one
> called 'attachment'?
>
> B.
>
> On 23 January 2013 22:51, Nestor Urquiza <ne...@gmail.com> wrote:
>> Hellow guys,
>>
>> Can anyone help here please. I believe I am not deleting the
>> attachment correctly?
>>
>> 1. I delete a document as per documentation:
>> $ curl -k -X DELETE
>> "https://user:password@example.com:6984/db/sample.pdf/attachment/?rev=1-adb7b6f2e32d73758dfa16966c1caef9"
>> {"ok":true,"id":"sample.pdf","rev":"2-87988b99af60e2f7cb9022b65b7565d5"}
>>
>> 2. I check for the attachment and indeed it is not there:
>> $ curl -k -X GET
>> "https://user:password@udesktop3.sample.com:6984/db/sample.pdf/attachment"
>> {"error":"not_found","reason":"Document is missing attachment"}
>>
>> 3. Yet from futon (or the equivalent below) the attachment is downloaded?
>> $ curl -O -k -X GET
>> "https://user:password@udesktop3.sample.com:6984/db/sample.pdf/sample.pdf"
>>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>>                                  Dload  Upload   Total   Spent    Left  Speed
>> 100  163k  100  163k    0     0  1707k      0 --:--:-- --:--:-- --:--:-- 1817k
>>
>> Thanks,
>> -Nestor

Re: Attachment still accessible after being deleted

Posted by Robert Newson <rn...@apache.org>.
Do you have an attachment called 'sample.pdf' in addition to one
called 'attachment'?

B.

On 23 January 2013 22:51, Nestor Urquiza <ne...@gmail.com> wrote:
> Hellow guys,
>
> Can anyone help here please. I believe I am not deleting the
> attachment correctly?
>
> 1. I delete a document as per documentation:
> $ curl -k -X DELETE
> "https://user:password@example.com:6984/db/sample.pdf/attachment/?rev=1-adb7b6f2e32d73758dfa16966c1caef9"
> {"ok":true,"id":"sample.pdf","rev":"2-87988b99af60e2f7cb9022b65b7565d5"}
>
> 2. I check for the attachment and indeed it is not there:
> $ curl -k -X GET
> "https://user:password@udesktop3.sample.com:6984/db/sample.pdf/attachment"
> {"error":"not_found","reason":"Document is missing attachment"}
>
> 3. Yet from futon (or the equivalent below) the attachment is downloaded?
> $ curl -O -k -X GET
> "https://user:password@udesktop3.sample.com:6984/db/sample.pdf/sample.pdf"
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100  163k  100  163k    0     0  1707k      0 --:--:-- --:--:-- --:--:-- 1817k
>
> Thanks,
> -Nestor