Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

P3 Dashboard does not seem to execute transformation #10

Closed
ktk opened this issue Sep 16, 2015 · 9 comments
Closed

P3 Dashboard does not seem to execute transformation #10

ktk opened this issue Sep 16, 2015 · 9 comments

Comments

@ktk
Copy link

ktk commented Sep 16, 2015

I configured an OpenRefine transformer as described in issue #9. When I create a widget on the dashboard for this transformer and upload a file, nothing seems to happen. I never see any request in the batchrefine log.

@ktk
Copy link
Author

ktk commented Oct 14, 2015

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.

@ktk ktk closed this as completed Oct 14, 2015
@ktk
Copy link
Author

ktk commented Oct 14, 2015

Woops didn't want to close this sorry.

@ktk ktk reopened this Oct 14, 2015
@retog
Copy link
Member

retog commented Oct 14, 2015

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?

@ktk
Copy link
Author

ktk commented Oct 21, 2015

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.

@retog
Copy link
Member

retog commented Nov 9, 2015

@szluca would it be possible to do some guessing based on the file name extension if no Content-Type header is sent?

@szluca
Copy link
Member

szluca commented Nov 30, 2015

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.

@ktk
Copy link
Author

ktk commented Nov 30, 2015

@szluca I think the best reference is https://www.iana.org/assignments/media-types/media-types.xhtml

@retog
Copy link
Member

retog commented Nov 30, 2015

@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

@szluca
Copy link
Member

szluca commented Dec 1, 2015

Okay, thank you.

@szluca szluca closed this as completed Dec 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants