Skip to content
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

Is there a file Size limit for uploading with REST API? #1764

Closed
wkpalan opened this issue Apr 21, 2019 · 6 comments
Closed

Is there a file Size limit for uploading with REST API? #1764

wkpalan opened this issue Apr 21, 2019 · 6 comments

Comments

@wkpalan
Copy link

wkpalan commented Apr 21, 2019

I am trying to upload a large file 1-2GB into Zendo sandbox. I keep getting a EPIPE error when I submit my request.

data = {"filename":'test.tar'}
files ={'file' : ("test.tar",open('test.tar','rb'),{'Expires': '0'})}

r = requests.post('https://sandbox.zenodo.org/api/deposit/depositions/274851/files',
              params={'access_token': ACCESS_TOKEN},files=files,data=data)

The error I get is as follows

ConnectionError: ('Connection aborted.', error("(32, 'EPIPE')",))

Is this due to a size limit imposed on the uploads?

@wkpalan wkpalan changed the title Is there a file Size limit for REST API? Is there a file Size limit for uploading with REST API? Apr 21, 2019
@frankois
Copy link
Contributor

Indeed there is a size limit old API, which supports up to 100MB per file. The new API supports up to 50GB per file and you can see how to use it at the following links:

This API is not completely stable, so it might change a bit in the future. As soon as we will develop a stable version, we will update the documentation here: http://developers.zenodo.org/#deposition-files

Let me know should you need further help.

@wkpalan
Copy link
Author

wkpalan commented Apr 25, 2019

Thank you for the reply @frankois. I will check the new API out.

@abubelinha
Copy link

abubelinha commented Feb 5, 2021

I am a bit confused when I read about the new and old APIs: I can't find them.

I have just discovered Zenodo and this is the only documentation I found. But it doesn't say it refers to new or old API:
https://developers.zenodo.org

So I have not clear if both old and new versions keep working at the same time, having different url access ... or there is just one API access, so extant python applications might stop working due to changes and new functionalities.
Please @frankois could you clarify this?

Is there a published changelog somewhere, so we can know when the each new API feature was released?
I mean: if I find a python script somewhere, how can I tell (by its date) if it was written for the old or new API?


More specifically, I was trying to use this Python interface to Zenodo API:
https://github.com/SiLeBAT/zenodo-python

But, as I reported there, my uploads are failing because files in the repository get corrupted.
I suspect it could be related with this change in the API mentioned by @frankois .
Could please some expert review this line in their code:

data = {'file': open(file_path, 'rb')}

And compare against the link above provided by @frankois , where @slint says:
"We pass the file object (fp) directly to request as 'data' for stream upload".
So, I guess the line above referred to old API, and perhaps it should be corrected to something like this?

data = open(file_path, 'rb')

@johanneskoester
Copy link

Dear @frankois. Any update on stabilizing the API for bigger file sizes? Since your post is quite old, has this effort been abandoned?

@ppanero
Copy link

ppanero commented Mar 4, 2022

Hi @johanneskoester, some changes have been made since then to improve the files submission (e.g. offloading, instead of passing the files through the python app, config, etc.). Does the issue still persists?

@johanneskoester
Copy link

I actually haven't checked, I was just referring to the blue note here at the top:
https://developers.zenodo.org/#delete

It says that there is still a 100MB limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants