Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
aioftp.ConnectionConditions.passive_server_started)
async def coll(self, connection, rest):
@aioftp.ConnectionConditions(
aioftp.ConnectionConditions.data_connection_made,
wait=True,
fail_code="425",
fail_info="Can't open data connection")
@aioftp.server.worker
async def coll_worker(self, connection, rest):
stream = connection.data_connection
del connection.data_connection
async with stream:
for i in range(count):
@aioftp.ConnectionConditions(
aioftp.ConnectionConditions.login_required,
aioftp.ConnectionConditions.passive_server_started)
async def coll(self, connection, rest):
@aioftp.ConnectionConditions(
aioftp.ConnectionConditions.data_connection_made,
wait=True,
fail_code="425",
fail_info="Can't open data connection")
@aioftp.server.worker
async def coll_worker(self, connection, rest):
stream = connection.data_connection
del connection.data_connection
async with stream:
aioftp.ConnectionConditions.login_required,
aioftp.ConnectionConditions.passive_server_started)
async def coll(self, connection, rest):
@aioftp.ConnectionConditions(
aioftp.ConnectionConditions.data_connection_made,
wait=True,
fail_code="425",
fail_info="Can't open data connection")
@aioftp.server.worker
async def coll_worker(self, connection, rest):
stream = connection.data_connection
del connection.data_connection
async with stream:
aioftp.ConnectionConditions.data_connection_made,
wait=True,
fail_code="425",
fail_info="Can't open data connection")
@aioftp.server.worker
async def coll_worker(self, connection, rest):
stream = connection.data_connection
del connection.data_connection
async with stream:
for i in range(count):
await stream.write(str.encode(str(i) + "\n"))
connection.response("200", "coll transfer done")
@aioftp.ConnectionConditions(
aioftp.ConnectionConditions.data_connection_made,
wait=True,
fail_code="425",
fail_info="Can't open data connection")
@aioftp.server.worker
async def coll_worker(self, connection, rest):
stream = connection.data_connection
del connection.data_connection
async with stream:
for i in range(count):
await stream.write(str.encode(str(i) + "\n"))