-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add file-type to file upload #118
Comments
…e method use the default content type when encoding the POST request if it's not supplied explicitly. (gdcc#118)
Yes, I can confirm that this is the case - there is currently no way to pass the mime type to |
Fwiw, the solution proposed does not work with older versions of Dataverse (in our case 5.3). The solution we found at Odum was to add the mime type explicitly to the files. If someone needs to support this with an older install, the work is here https://github.com/OdumInstitute/pyDataverse/tree/mime_type_upload . Note that to use this functionality you'll have to install a package in your project to get the mime type for your file. We use python-magic (and the underlying libmagic library). I decided not to create a PR for this because my understanding of pyDataverse is that it doesn't try to support the intricacies of older Dataverse versions. But if this work is something that the community wants I can create an issue and a PR for it. |
@matthew-a-dunlap pyDataverse tries to help everyone with any kind of Dataverse version, so your solution would be really nice to be merged. The problem is, I am not funded anymore, so there is no one right now maintaining this repo. And it would need some proper testing and reviewing before it can be merged (and then a release later on to merge it to master). |
As discussed during the 2024-02-14 meeting of the pyDataverse working group, we are closing old milestones in favor of a new project board at https://github.com/orgs/gdcc/projects/1 and removing issues (like this one) from those old milestones. Please feel free to join the working group! You can find us at https://py.gdcc.io and https://dataverse.zulipchat.com/#narrow/stream/377090-python |
(please note that I made a quick/trivial PR addressing this issue 2 years ago - #142; I don't know/haven't checked if it's still relevant) |
@landreev hmm, thanks, I just brought it up on Zulip: https://dataverse.zulipchat.com/#narrow/stream/377090-python/topic/Add.20file-type.20to.20file.20upload.20.23118/near/423708188 |
@lincolnsherpa hi! Nice seeing you in Braga last June. Great talk. As @JR-1991 and I discussed (recording), we're pretty sure this has been fixed in the default (master) branch thanks to a switch from |
Hi Philipp...
Hope you are healthy and doing well..
Thank you for the Updates...
Yes definitely i'll have a Look over it .
Testing might Take some time for me :)
BR
Lincoln
…On Wed, 27 Mar 2024, 2:39 pm Philip Durbin, ***@***.***> wrote:
@lincolnsherpa <https://github.com/lincolnsherpa> hi! Nice seeing you in
Braga last June. Great talk.
As @JR-1991 <https://github.com/JR-1991> and I discussed (recording
<https://drive.google.com/file/d/1kF5wV_w1Li7rgVXAaUpr5XOJiqgsYqTF/view?usp=share_link>),
we're pretty sure this has been fixed in the default (master) branch thanks
to a switch from requests to httpx in #174
<#174>. Are you interested in
re-testing? Thanks!
—
Reply to this email directly, view it on GitHub
<#118 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEUWJ2JP3VG3C5AR76SMZ5TY2LDZ7AVCNFSM4ZCH2V32U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBSGI3TSNZUGY2A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello,
-While uploading datafile, the file-type is not recognised ( it is by default text/plain) while uploading. Even if contentType field is assigned (manually) using set command, the contentType again goes to default
The text was updated successfully, but these errors were encountered: