Closed

PHP Class for DropBox/GDrive/OneDrive Upload/Download from Queue

Write a class in PHP, under PSR standards(ready for PSR-4 Autoloader and written in PSR-2 standard)

Cloud drives are associated to users, with access_token stored in mysql. Assume you already have tokens for each cloud needed for upload/download -> getting them is handled outside this project.

Upload:

1. The class would access a simple database , grab a list of tasks and files associated to them (2 MYSQL tables > first for tasks, and another for files in a task)

upload_tasks: [ id int, user_id int, created timestamp, progress decimal(5,2), completed tinyint(1) default 0, paused_until timestamp default 0, last_updated timestamp, completed_timestamp timestamp ]

upload_files: [ id int, hash varchar(40), node_id varchar(4), path, completed tinyint(1) default 0, fails tinyint(2) default 0, failed tinyint(1) default 0 ]

2. The class would filter out files based on the NODE_ID column in the second table, aligning to a $node_id passed to it.

path in the upload_files table is the full path to upload the file to, including folder tree.

Create the folder tree if it doesn't exist.

If an identical file exists, overwrite only if it's a different size than the one being uploaded.

3. For each file:

a. If uploaded successfully, mark completed in the files table

b. If failed due to temporary GDrive/DropBox/OneDrive error update paused_until to 10 minutes from now. Do not run uploads from the tasks again until that time

c. if fails because of a class error(file doesn't exist) mark file as failed.

d. If general upload issue, update fails. after 4 fails mark file as failed.

e. If file is failed completely(d) or succeeded, update progress on the task => progress = files/total_files*100

Download:

1. The class would access a simple database , grab a list of tasks and files associated to them (2 MYSQL tables > first for tasks, and another for files in a task. For when finished > folders, files, folder_files for storing metadata)

download_tasks: [ id int, user_id int, created timestamp, progress decimal(5,2), completed tinyint(1) default 0, paused_until timestamp default 0, last_updated timestamp, completed_timestamp timestamp ]

download_files: [ id int, hash varchar(40), node_id varchar(4), path varchar(1023), completed tinyint(1) default 0, fails tinyint(2) default 0, failed tinyint(1) default 0 ]

files : [ id, hash, node_id ]

folder_files: [ id, user_id, hash, name, folder_id ]

folders: [ id, user_id, parent_id, name, name_md5 ]

2. The class would filter out files based on the NODE_ID column in the second table, aligning to a $node_id passed to it.

path in the download_files table is the full path to upload the file to, including folder tree.

3. For each file:

a. Grab from the cloud account from "path"

a. If downloaded successfully: copy to $store_folder(passed to class)

b. If failed due to temporary GDrive/DropBox/OneDrive error update paused_until to 10 minutes from now. Do not run uploads from the tasks again until that time

c. if fails because of a class error(file doesn't exist) mark file as failed.

d. If general download issue, update fails count in the upload_files table. after 4 fails mark file as failed.

e. If file is failed completely(d) or succeeded, update progress on the task => progress = files/total_files*100

Additional Requirements:

1. The class must handle more than one task in parallel. (download/upload from $X tasks in parallel. One file-per-task at a time)

2. The class must utilise GUZZLE/HTTP for uploads/downloads. Include using composer only.

3. [login to view URL] -> use async/parallel requests to implement parallelization

4. Database connectivity must be with PDO/Mysql only. Do use prepared statements.

5. All connectivity to cloud drives must use tokens. no username/password login.

The tokens are unique per user_id. store them in a mysql table. design it however you want.

Handling of token creation is not required. Assume you get the tokens from the database.

Skills: Database Programming, MySQL, PHP, Software Architecture

See more: dropbox api php class download, php upload download docx, php upload download resume, php code upload download pdf file, php class mediafire upload, php upload download util, megavideo download php class, flickr php photo database upload download, script php upload download file, php script upload download files, upload download php script, upload download php, upload download file transfer php script, php application upload download, free php upload download script, script php music upload download listening, upload download large file progress bar php free, script php mp3 upload download

About the Employer:
( 1 review ) Nesher, Israel

Project ID: #16744260

31 freelancers are bidding on average $1124 for this job

$1250 USD in 20 days
(41 Reviews)
8.0
$1250 USD in 20 days
(31 Reviews)
7.3
toseef3

Dear sir, I have read the job requirements very care fully and would like to share that we have 5+ years of experience in Enterprise, web and smartphone app development. We have completed dozens of websites for our More

$1250 USD in 20 days
(67 Reviews)
7.6
tranngocanh1702

Hi, I am Anna with more than 6 years experience in web and cross-platform app development including Hybrid, PHP, Laravel framework, Slim, CodeIgniter, MySQL, PostgreSQL, HTML, CSS, Javascript, jQuery, Vuejs, Ajax, More

$1250 USD in 20 days
(113 Reviews)
7.4
webperfection123

Hi there, Have a look my past PHP Work : [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] My web developing expertis More

$1000 USD in 10 days
(107 Reviews)
6.4
$1250 USD in 1 day
(74 Reviews)
6.4
lavizsolutions

Hi, Kindly share me more details so that i can give you estimated time and cost. Please check my below work.. 1. Case Management system. [login to view URL] you can crea More

$1500 USD in 20 days
(22 Reviews)
6.5
imagicaworld

Hello, Hopefully you are doing well. I Have read your job description and i can do this job, i have 5 year experience in website and application development . I Have done many biog project s so far like taxi app More

$1250 USD in 20 days
(74 Reviews)
6.2
$1250 USD in 20 days
(51 Reviews)
5.9
schoudhary1553

Hi there..... Warm Greetings We came along with your request for PHP Class for DropBox/GDrive/OneDrive Upload/Download from Queue and we reviewed your project description. We'd like to help you with confidence an More

$1250 USD in 20 days
(38 Reviews)
5.8
AddWebSolution7

Hello, Hope you are doing great! >> A gentle followup regarding my previous shared proposal. Reviewed the requirements and got clarity on it. Do possess 6+ years of experience with PHP and have passionately More

$1555 USD in 20 days
(9 Reviews)
5.4
abhyasam

i am dropBox and Onedrive expert and did Sync a/c here in this website [login to view URL] i can do it easily i am familiar with classes. thank you Mukesh

$1000 USD in 22 days
(29 Reviews)
5.6
techsoftpk

Hi there, I am professional SEO friendly web designer & developer.i can do this job for you Please send me message so that we can discuss the project in detail I have 5+ years of experience with more than 500 su More

$766 USD in 20 days
(61 Reviews)
5.6
ranumehta2017

Hello, Hope you are doing well. I have read your description and I CAN DO THIS JOB I am ready to start the work according to you. I have wide range of expertise knowledge in the same technology that your project More

$1250 USD in 20 days
(38 Reviews)
5.7
$1250 USD in 20 days
(6 Reviews)
5.7
somdeb1987

Hello, Thanks for the opportunity to take part biding on your project. I am Somdeb with 350+ website development experienced with all GREAT REVIEW by my previous employers. Please have a look on my profile here: More

$1000 USD in 30 days
(13 Reviews)
4.9
awnishdubey1990

Dear sir, I'm very interested for this Special well known API integration for file uploading project, I have 4+ Year of experience in this Field & I can surely do this project, I work with My Experienced Tea More

$750 USD in 21 days
(15 Reviews)
4.2
webdev1802

Hello, I studied your project,understood your requirement and i am interested in your project, I am an experienced website developer, I am absolutely sure that I can do the project very well. I assure you that y More

$1250 USD in 20 days
(10 Reviews)
4.1
freelancerkpis

Hi, Thanks for your project posting. I have understood your project description. **INTRODUCTION** “Kpis” is a software development company working with startups and established brands, like Smart city ”mission More

$1458 USD in 20 days
(10 Reviews)
4.5
debjithui

i have done many good systems live under my guideline i am expert of php , i have done many good work with many good clients from different countries My key skills are : Skills required: Graphic Design, HTML, PHP, More

$916 USD in 20 days
(4 Reviews)
3.6