raenonx / nas2http Goto Github PK
View Code? Open in Web Editor NEWBridge for serving and downloading the FTP content via HTTP.
License: MIT License
Bridge for serving and downloading the FTP content via HTTP.
License: MIT License
Possibly add an icon link beside the folder entry.
May need to use ajax for displaying the current zipping progress.
May send multiple file download requests instead to save the system resource consumption.
Log the file transfers.
Also to log any output and errors. during transfer.
Things to log:
Add an endpoint to deliberately trigger the error to log.
Content at FTP will be downloaded and stored to the memory then gives to the user.
https://github.com/RaenonX/Ftp2Http/blob/d974ed2855587322d49944eca2fb8718abe2f7b9/ftp.py#L157
The aim is to directly provide a pipeline from FTP to the user end so that the application resource consumption will not be massive if downloading a big file.
Download the whole file to the application memory, then forward the entire file content to the end user's client.
This causes the RAM consumption will be a lot for large files (> 1 GB).
Also, for these large files, users need to wait for the file to be downloaded to the RAM.
The server acts as a forwarder, forwarding the content get from the server to the end user's client.
The request can almost initiate instantly. Initiation time for the large file requests will be as same as the small files because it's just a handshake process.
Download time will also be reduced by 50% because the server no longer needs to download the file to its local first, then forward it to the end user's client. The content is directly handed to the end-users now.
Style & Stabililty improvements.
Use pytest
, pylint
, respectively.
Also to add load test.
The application is still processing the data, even if the request is being canceled.
Not happening on development PC, but happening on server PC.
Set a speed limit on NAS for the account designated for this application, so that if a request is canceled, the rate of dumping will be less (dumping still happening).
From NAS via FTP then HTTP, to NAS mapped to local then HTTP.
Data transfer may suddenly stop for some unknown reasons.
MIME-type may be the reason. Seems not.
Check the implementation of ftp.retrbinary()
.
This may be caused by wFastCGI via IIS.
Also, for #6, the application ran under IIS cannot find the network mapped drive. Current workaround is to use URL Rewrite on IIS to proxy the request to the application running in the background.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.