Forum Discussion

nishantcyno's avatar
nishantcyno
Explorer | Level 4
9 years ago

File uploading and downloading in business account.

Hi Dropboxer,

 

I am working on dropbox api in PHP and managing file and folder through running a script from server. All things are working file only issue which I am facing is to uploading a existing or simply downloading a file. 

 

I have successfully placed a API call and file is downloading inside my root directory but it is showing only 0Byte and same for placing uploading, I have received this 0Byte file on my dropbox. 

 

Why this is happening. I have tested script on Basic version of my dropbox working fine. But on Business account (my client's) I couldn't able to do this. 

 

Pls tell me know is there any problem with Buisness account.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    I'll be happy to help this, but I'll need some more information. Please reply with:

    - the name and version of the platform and SDK/library you are using
    - the steps to reproduce the issue
    - the full text of any error or output
    - the relevant code snippet(s)
    • nishantcyno's avatar
      nishantcyno
      Explorer | Level 4

      Thanks,

      Following the tutorials from https://www.dropbox.com/developers-v1/core/sdks/php

      -I'm using Composer for your project's dependencies, I have just add dropbox-sdk to your composer.json instead of downloading the SDK.

      dropbox/dropbox-sdk": "1.1.*"

       -I have successfully moved files from one folder to another folder through move($sourcepath,$destpath) API function. But I have a particular case where file may already exits at destination. So I have take a file from my dropbox $sourcepath and download in my system and then upload it on destination path. By doing this existing file remain there and new file got renamed and saved to dropbox $destpath. But showing 0Byte along with file name. Below screenshot shows a simillar issue inside my client's dropbox account. File size shows 0Byte.

       

      I have tried same with my basic Dropbox account and I am able to do it successfully. Below is the output Which I want for my client's Dropbox account.

      - I am doing this by PHP script following snippet shows the my particular logic

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        Apologies for the delay! I wasn't notified of your reply for some reason. Are you still having this issue?

        If so, can you share your first two screenshots as links? They didn't come through in the post.