504 error while downloading folders (size > 2GB) via API

  • 1
  • Question
  • Updated 1 week ago
We are using Sharefile - API : to download the files from root folder. This root folder has multiple subfolders.If size of the rootFolder > 2GB, then we are getting 504 error.  This issue is happening always if the size is ~2GB. For the folder size is less than this, then it is working as expected.

/Items({parentid})/Download?redirect=false&includeAllVersions=false

Steps we are following to download the root folder in .zip format ( in java)
1. Get the download URL from above API
2. Using org.apache.commons.io.FileUtils.copyURLToFile() or org.apache.commons.io.IOUtils.copyLarge() to download the folder. 
3. Download in the ZIP format


Error Stack Trace:

java.io.IOException: Server returned HTTP response code: 504 for URL: https://storage-usw-124.sharefile.com/download.ashx?dt=dta705e48953af4838bf872f64bfe4065d&h=4SmK... at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at org.apache.commons.io.FileUtils.copyURLToFile(FileUtils.java:1489) at 

Photo of ReddyPS

ReddyPS

  • 2 Posts
  • 0 Reply Likes

Posted 2 weeks ago

  • 1
Photo of ReddyPS

ReddyPS

  • 2 Posts
  • 0 Reply Likes
Any updates on this ? Let me know if you need any further details.

Thank you
Praveen S