Comments (8)
hrm, I'm curious what the content of postVars
is in your case... could you console.log it and paste it in this bug?
from jsdav.
{ '-----------------------------10039407114525152981185019459\r\nContent-Disposition: form-data; name': '"jsdavAction"\r\n\r\nput\r\n-----------------------------10039407114525152981185019459\r\nContent-Disposition: form-data; name="name"\r\n\r\ntest file name\r\n-----------------------------10039407114525152981185019459\r\nContent-Disposition: form-data; name="file"; filename="test.bin"\r\nContent-Type: application/macbinary\r\n\r\n\r\n-----------------------------10039407114525152981185019459--\r\n' }
this is the console.log(postVars).
The file uploaded has been generated with the touch command.
regards
I
from jsdav.
That looks horrid. I don't know what touch
does, but it's not making the NodeJS HTTP parser very happy!
My guess: this will be fine when you upload via your browser...
from jsdav.
it might be a misunderstanding: I created the uploaded file using the touch unix command, and I posted that file, but I tried also pdf or images, using the form. I used Firefox, Chrome and Safari to see possibily different behaviours but the request is alwasy the same. I'm tryng with formidable and the request is parsed correctly. I've inspected the post with firebug and the result is the following:
-----------------------------173963131221410905262072481350 Content-Disposition: form-data; name="jsdavAction" put -----------------------------173963131221410905262072481350 Content-Disposition: form-data; name="name" -----------------------------173963131221410905262072481350 Content-Disposition: form-data; name="file"; filename="test.bin" Content-Type: application/macbinary -----------------------------173963131221410905262072481350--
posting with chrome gives the following
`------WebKitFormBoundaryAoGsMLD1PPfZ2Cvb
Content-Disposition: form-data; name="jsdavAction"
put
------WebKitFormBoundaryAoGsMLD1PPfZ2Cvb
Content-Disposition: form-data; name="name"
------WebKitFormBoundaryAoGsMLD1PPfZ2Cvb
Content-Disposition: form-data; name="file"; filename="test.bin"
Content-Type: application/macbinary`
response is still the "Not Implemeted" xml
client and server see the same.
Any suggestions?
from jsdav.
ah, right! No, what I meant is console.log("POST VARS", postVars);
in browser.js
... can you do that?
from jsdav.
that's I was talking about in my first comment, anyway here is the log line 167 browser.js
POST VARS { '-----------------------------104718410513947655702040927985\r\nContent-Disposition: form-data; name': '"jsdavAction"\r\n\r\nput\r\n-----------------------------104718410513947655702040927985\r\nContent-Disposition: form-data; name="name"\r\n\r\n\r\n-----------------------------104718410513947655702040927985\r\nContent-Disposition: form-data; name="file"; filename="test.bin"\r\nContent-Type: application/macbinary\r\n\r\n\r\n-----------------------------104718410513947655702040927985--\r\n' }
from jsdav.
I also found this issue when I use the example to upload a file to server. So, I had to write another method to parse request body instead of Qs.parse(), but there is another problem, I don't know where the postVars.tmp_file property comes from, but in jsDAV/lib/DAV/plugins/browser.js, there is a condition statement to check postVars.tmp_file
from jsdav.
Ah I now see where the problem is coming from. I'll try to make this work asap. I've been very busy with my (new) job at Mozilla, so my apologies for the delay.
from jsdav.
Related Issues (20)
- jCal/jCard parsing HOT 1
- VObject/Property .hasFeature is not defined on String HOT 3
- Question: How to run server using HTTPS? HOT 1
- DavMount link dead HOT 1
- Passing multiple Trees as array to nodes to WebDAV Server instance? HOT 9
- Unable to run inside Docker container HOT 1
- How to filter response sent to client?
- Tree insideSandbox doesn't account for immediate parent directory
- Regular Expression Denial of Service HOT 1
- Delete locks on DELETE method HOT 6
- Unterminated character class HOT 1
- Space in filename is not recognized HOT 4
- User management for jsDAV
- How jsDAV callbacks work
- carddav
- jsDAV - Unsupported method
- Can you support hooks?
- Upgrade moment to 2.11.2 - CVE-2016-4055
- CalDAV Backend? HOT 2
- New webdav client
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsdav.