Comments (9)
Issue fusepoolP3/p3-proxy#12 indeed fixed the execution, thanks!
However I noticed that it works in Chrome only, in there a csv
file seems to set the correct Content-Type header text/csv
and the filename stays as I would expect it.
In Firefox an upload of a file with a csv
extension results in a filename.csv.bin
file in the transformer and in the execution it sets:
batchrefine p3 08:09:12.723 [...BatchRefineTransformer] Content-Type:application/x-unknown (0ms)
Which will fail in BatchRefine as it's not a supported input-type.
from p3-dashboard.
Woops didn't want to close this sorry.
from p3-dashboard.
Ok, I tried post a cvs with firefox (Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0) and the Content-Type is correctly "text/csv".
I don't think that the problem you experience is related to the dashboard. Could you please document in terms of curl request and create an issue against the proxy if you think this should somehow deal with browsers sending wrong content-type?
from p3-dashboard.
I've seen this effect with the p3-resource-gui as well today while demonstrating the platform. For reasons I don't understand Marco could not upload a JSON config to LDP without getting it renamed to .bin. It didn't matter if he was using Chrome or Firefox (on Windows). So I had a look at the headers and noticed that in his case no content-type
field was sent with the .json file. In my case on Macos both Firefox and Chrome send Content-Type:application/json
with the request and then everything is fine.
Can anyone reproduce that? I have no clue on what decision the browser either sends or does not send the content-type. And obviously if its missing LDP seems to handle it as binary.
from p3-dashboard.
@szluca would it be possible to do some guessing based on the file name extension if no Content-Type header is sent?
from p3-dashboard.
Do we know about any other file types that get sent without content-type?
I've built in a guessing mechanism, and added only ".json" -> "application/json" so far.
from p3-dashboard.
@szluca I think the best reference is https://www.iana.org/assignments/media-types/media-types.xhtml
from p3-dashboard.
@szluca it all depends on the configuartion of the client. Basicall if the content type is not set or application/octet-stream the app should do some guessing, but of course the list of extension the dashboard knows about can be much shorter than the typical /etc/mime.types file. I can think of the following extensions the dashboard should recognize: json, csv, ttl, n3, nt, rdf, turtle, xml
from p3-dashboard.
Okay, thank you.
from p3-dashboard.
Related Issues (19)
- create a release HOT 1
- Change default port to 8200
- Change default port HOT 1
- Make new release HOT 2
- Update readme
- UIR Widget should not need manually set title
- Refresh widget unintrusively in the background HOT 2
- I should see the URI of TLDPC and be able to add existing TLDPC to my configuration
- Transformer test UI does not set proper headers
- Transformer test UI should provid a list of supported input/output mime-types
- SPARQL endpoint URI and platform URI contain hardcoded paths HOT 2
- Use of <> in Turtle used by P3 Dashboard and P3 Autoconfiguration Tool without stipulating @base causes problems using Virtuoso LDP backend. HOT 1
- Transformer output type cannot be specified HOT 2
- Transformer configuration breaks with leading whitespace in the config HOT 1
- use p3-platform-js
- don't force user to enter configuration name on first accessing the dashboard HOT 3
- what is http://vocab.fusepool.info/wrldpc# namespace?
- Dashboard does not show widgets HOT 2
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 p3-dashboard.