shareplum
shareplum copied to clipboard
Add timeout argument to Folder
It would be beneficial to set a custom timeout when working with larger files.
The change would be to init in folder.py:
from .request_helper import get, post
import json
class _Folder():
def __init__(self, session, folder_name, url, timeout):
self._session = session
self.folder_name = folder_name
self.site_url = url
self.timeout = timeout
self.info = self._create_folder()
And to site.py:
def Folder(self, folder_name, timeout=3):
"""Sharepoint Folder Web Service
"""
return _Folder(self._session, folder_name, self.site_url, timeout)
This timeout would be for the session object?
On Thu, Oct 8, 2020 at 2:01 PM crossalchemist [email protected] wrote:
It would be beneficial to set a custom timeout when working with larger files.
The change would be to init in folder.py:
from .request_helper import get, postimport json
class _Folder(): def init(self, session, folder_name, url, timeout=3): self._session = session self.folder_name = folder_name self.site_url = url self.timeout = timeout
self.info = self._create_folder()— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jasonrollins/shareplum/issues/128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOVTVW44CNT744ZT762NBLSJYD67ANCNFSM4SJEKMEA .
I'm not sure. By making these changes, and specifying a 30 second timeout, I was able to upload a 25 MB file.