You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When putting standalone attachments to a document that are named like "folder/filename.txt" the CGI.escape escapes the slashes. This way you cannot produce paths like http://host/dbname/doc_id/folder/filename.txt which would be great since couchdb itself supports it (while futon fails).
I fiddled a bit with the escaping of attachment names, but now a single test is failing
"POST document with attachment (with funky name)" within the database_spec.rb (specifically line 417, when fetching the attachment by name).
I don't know how to fix this without breaking compatiblity with other stuff.
Any suggestions?
The text was updated successfully, but these errors were encountered:
uum, I think it might have something to do with double escaping the attachment name in your current version.
url_for_attachment does it, while put_attachment does it as well, which then passes the escaped name to url_for_attachment. This way "folder/text.txt" will be saved as "folder%2Ftext.txt", which should not be what is expected, since fetch_attachment will fail to fetch "folder/text.txt"
I'll send you a pull request as soon as I committed the change to my fork
When putting standalone attachments to a document that are named like "folder/filename.txt" the CGI.escape escapes the slashes. This way you cannot produce paths like http://host/dbname/doc_id/folder/filename.txt which would be great since couchdb itself supports it (while futon fails).
I fiddled a bit with the escaping of attachment names, but now a single test is failing
"POST document with attachment (with funky name)" within the database_spec.rb (specifically line 417, when fetching the attachment by name).
I don't know how to fix this without breaking compatiblity with other stuff.
Any suggestions?
The text was updated successfully, but these errors were encountered: