uploading files to OneDrive

Joe Mahone 0 Reputation points
2023-04-24T15:35:53.62+00:00

Hi team, Joe here from WPvivid team, we are the developer of WPvivid Backup Plugin - https://wordpress.org/plugins/wpvivid-backuprestore/. We've supported OneDrive as one of remote cloud storage for years now. In our plugin, we use OneDrive's php sdk for uploading backup files to OneDrive, when uploading a file, we create a upload session first - "https://graph.microsoft.com/v1.0/me/drive/root:/'.$path.':/createUploadSession", then use the returned uploadUrl to send an http request to upload the file to OneDrive. The method of sending the http request is php "curl_exec". Recently we found on some servers the uploading process would get stuck, it is not stuck every time, but a certain time after uploading some chunks, the "curl_exec" would not returned a result. Finally, the script execution time of the server would be reached and the uploading process would time out, then our plugin would retry the process by resending the http request. If this is repeated, the uploading process would be successful in one of the retries. We have checked with the server proviers and they said that their servers have no limit on the number of http requests to be sent or the amount of data to be uploaded each request. So, do you have any idea what would be the possible reasons for the http issue? The chunksize we set to upload by each http request is 2MB. We also have tried reducing it to 512K, but that does not solve the issue. Please note that this issue is not occuring in most servers, only on some servers, for example, the server providers are WilkinsIT Solutions(Wilkins IT Solutions- IT solutions provider Durham https://wilkinsit.ca/)and https://www.20i.com/. Thanks for your time in advance!

Microsoft 365 and Office | OneDrive | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emi Zhang-MSFT 30,046 Reputation points Microsoft External Staff
    2023-04-25T06:19:38.3866667+00:00

    Hi, I suggest you post this issue to OneDrive for Developer forum:

    https://techcommunity.microsoft.com/t5/onedrive-developer/bd-p/OneDriveDeveloper The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.