unable to open downloaded Zip Files

  • 1
  • Problem
  • Updated 5 months ago
some of the zip files are unable to extract ....giving error it does not appear to be valid archive... what is the reason and how to solve it.

we are using your API code under .Net as given in your documentation
Photo of Imran

Imran

  • 10 Posts
  • 1 Reply Like

Posted 8 months ago

  • 1
Photo of Michael Berrier

Michael Berrier, Official Rep

  • 123 Posts
  • 24 Reply Likes
Imran,

Sorry to hear you're having trouble.

We will need more information in order to help you. Is this a zip file that you uploaded personally and know is a valid archive? If you download it via the ShareFile web app or another tool (ShareFile Sync, ShareFile Desktop, etc.), are you able to extract it?

Please also describe which API endpoint you're calling and the parameter values you're passing. A network trace (e.g., one captured by a tool like Fiddler) would be ideal to help us troubleshoot.

If possible, please also provide the account ID (or the account's ShareFile subdomain) where you're having issues, as well as the item ID of the zip file in question.

If you are uncomfortable sharing any of these details on this forum, feel free to provide them to me in a text file via this ShareFile share:

https://michaelberrier.sharefile.com/r-rdc4ab99c33c4f448

Michael Berrier
ShareFile Engineering
Photo of Imran

Imran

  • 10 Posts
  • 1 Reply Like
this occurs mostly for .tiff Files
Photo of Michael Berrier

Michael Berrier, Official Rep

  • 123 Posts
  • 24 Reply Likes
Hi Imran,

I received the file you uploaded, but it does not include any of the information requested.

Michael
Photo of Michael Berrier

Michael Berrier, Official Rep

  • 123 Posts
  • 24 Reply Likes
Ram,

Yes, you can use ShareFile over FTP.
https://support.citrix.com/article/CTX207859

Michael
Photo of Imran

Imran

  • 10 Posts
  • 1 Reply Like
hi Micheal, 

i had shared all the logical data like ClientID, Calling function and how i am calling that function.  we can not share account detail due to security reasons
Photo of Michael Berrier

Michael Berrier, Official Rep

  • 123 Posts
  • 24 Reply Likes
Imran,

Is this a zip file that you uploaded personally and know is a valid archive? If you download it via the ShareFile web app or another tool (ShareFile Sync, ShareFile Desktop, etc.), are you able to extract it?

It sounds like you're using a version of code adapted from this sample:
http://api.sharefile.com/rest/samples/csharp.aspx

You might also want to consider using the ShareFile .NET SDK if that's an option available to you, since it tends to be the most robust and accessible way to interact with the API. You can certainly use the code sample as a guide for how to call the API without the SDK, but you may need to augment it yourself with more logging to understand what's failing in this case. For example, logging the HTTP response code and/or body would help rule out an issue with the call to the Download endpoint or the redirect to Storage Center. Even better would be a raw network trace with a tool like Fiddler.

Beyond that, I would most likely need more information about the account and item(s) affected in order to help you further.

Michael
Photo of Imran

Imran

  • 10 Posts
  • 1 Reply Like
yes it is a valid pdf uploaded by our client on sharefile shared folder but when i downloaded via API it does download it with same size but at the time of opening it says can not open the file, it does not apear to be valid archive but when i extracted it via sharefile desktop it downloads and open properly, but i want it to happened via API program automatically that is why i am using API
Photo of Michael Berrier

Michael Berrier, Official Rep

  • 123 Posts
  • 24 Reply Likes
Imran,

On my own account, I tried using the code sample to download several zip files with varying contents and was able to extract them all successfully. I suggest you try using the SDK if you haven't. Otherwise, you'll really just need to add some more logging and/or capture the raw HTTP calls to download the file and get some more information.

Michael