How to upload a backup of files to the cloud ?

How to upload a backup of files to the cloud - The secure way:


NOTE: Never, ever upload privacy sensitive data to cloud services!

Programs needed: pv, gnupg2, progress and split

Step 1 - make a archive to reduce space usage
tar cf - /folder-with-files | pv -s $(du -sb /folder-with-files | awk '{print $1}') | gzip > files.tgz

Step 2 - encrypt your data with gnupg2
gpg -c files.tgz &
progress -mp $!

Step 3 - Calculate the size of your encrypted archive
du -sh files.tgz.gpg

Step 4 - cut the encrypted archive in parts of your desired size (100MB in this example)
split -db 100M files.tgz.gpg files.tgz.gpg.part

Step 5 - Upload the parts to your desired cloud.

Written by Erwin Oldebsten 29/05/2017

How to Upload a File and limit its size or type with PHP

It is easy to upload a file to the server with PHP

1. First you must configure PHP to allow file upload
In your "php.ini" file, search for the file_uploads directive, and set it to On:
Code :
file_uploads = On

2. Then, you have to create a HTML form that allow users to choose the file or the image they want to upload, using this code
Code File Link:  http://ow.ly/xL7w304Zg3v

Notes:
Some rules to follow for the HTML form above:
    - Make sure that the form uses method="post"
    - The form also needs the following attribute: enctype="multipart/form-data". It specifies which content-type to use when submitting the form
Without the requirements above, the file upload will not work.
Other things to notice:
    - The type="file" attribute of the <input> tag shows the input field as a file-select control, with a "Browse" button next to the input control

The form above sends data to a file called "upload.php", which we will create next.

3. Then you will create the upload file PHP script
The "upload.php" file contains the code for uploading a file:
Code File link : http://ow.ly/Rygr304Zgfy

Note: You will need to create a new directory called "uploads" in the directory where "upload.php" file resides. The uploaded files will be saved there.

4. File Already Exists:
First, we will check if the file already exists in the "uploads" folder. If it does, an error message is displayed, and $uploadOk is set to 0 as you can see in this Code File link : http://ow.ly/iV11304ZgpK

5. Limit File Size:
Now, we want to check the size of the file. If the file is larger than 500KB, an error message is displayed, and $uploadOk is set to 0, You can download the Code File here : http://ow.ly/QlTv304ZgDf

6. Limit File Type:
if you want to allow users to upload JPG, JPEG, PNG, and GIF files. All other file types gives an error message before setting $uploadOk to 0:
Code File Link: http://ow.ly/Oio2304ZgLI

HOW TO UPLOAD THINGS TO CYTUBE (WITHOUT GOOGLE DRIVE)

1. Download Handbrake (https://handbrake.fr/)
2. ReEncode the video file into .mp4. Try to keep the file size under 200mb or else it won't upload (burn in the subs if need be)
3. upload to a file upload site (https://nya.is/ works for me)
4. Add link as a video to cytube
5. Voila