I have many many pdf files around 50GB in my Ebooks folder.
Now i want to upload them in Google docs like Rsync of Linux.
Is it possible to have the script in php or python which uploads all pdf files in Ebooks folder and subfolders to Google docs.
Now the problem is i need to restart computer many times and i want that script should start from where it was left with previous file so that i don't need to manually make selection of files. is it possible
You'd use the Google Documents API to upload them using a simple HTTP POST with the data. Here's an explanation how to upload and convert documents: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#UploadingDocs
The link will provide you will examples and all you need to do what you were asking for.
To be more precise this is what you are looking for if you want to upload pdf's: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#ResumableUploadPUT
Python Google Documents API guide
PHP Google Documents API guide
Related
I am new here and newbie in Google Drive thing. I managed to follow and install Google Drive v3. Now, I am stuck as to how can I make a simple PHP code that will upload a text file to my Google Drive. I need a simple PHP code / guide on how to upload a small text file. Please help.
Thanks in advance.
If you want to know how to upload file, then you can check the DRIVE API documentaion for that.
Here you can find 3 options on how to upload file.
simple upload
multipart upload
resumable upload
Just visit the above link to know more about them.
For the PHP code that you want, then you can check the answer in this SO question.
Just remember that you need to set <YOUR_REGISTERED_REDIRECT_URI> to the document to authenticate it.
For more information or other way to upload file using service account, check this SO question.
If you want to understand the process of file upload on google drive.
There is a repository on GitHub on how to authenticate and upload files on google drive using Google Drive API in PHP. You can give it a try.
https://github.com/SM4991/php-google-drive
We have our company website and we have many job opportunities often. So we have created a form where in interested candidates can apply directly. We also have a resume upload facility, right now resumes are uploaded and stored using PHP this resumes are stores onto our server, but we don't want to waste server space so we were thinking to just create one dedicated folder for resumes on Google drive and whenever user uploads his resume from our web site it will get stores onto a Google drive folder. Is this possible. We don't want to do it with Google forms or form+ since we have form matching our website theme.
It is possible to integrate into your website the Google Drive SDK which can allow you to do just that. You should look here for the PHP tutorial.
So yes, you can directly store the documents on the Google Drive using the API provided here. Look over here to access the more specifics for file uploading.
yes, it is possible with the php google class.
a very good example you can get from: http://hublog.hubmed.org/archives/001954.html
Is there any possiblity to create a thumbnail of uploaded video file in php without using ffmpeg.
Most server side scripts rely on ffmpeg, so if you can't use that you can either upload the video to an external service but that would mean sending the whole file OR you could try creating them client-side in the browser -- Generate thumbnails from video files using HTML5's video tag and canvas
If however you can't use ffmpeg for installtion reasons you could look at a wrapper -- It currently provides FFmpeg-PHP emulation in pure PHP so you wouldn't need to compile and install the module.
In the past I have used this website to do video conversion and create thumbnails. It works very well and have both free and paid plans.
The system consists of several "robots" that do different jobs. These robots can read your videos if you put them in a public folder with an URI or Amazon S3 for example. The actions that the robot must do are defined in "templates" in JSON and have a PHP SDK. Have a look at the docs.
P.S: I'm not related with transloadit, seems like I am a commercial guy...
So far, I've built a PHP script that downloads to a remote server of mine a file from Internet, provinding its URL (I've used this piece of code to download to the server).
Now I would like to upload the downloaded file on Google Drive using its API.
My question is: Is there a way to download the file directly to Google Drive, without using the server? Or I am forced to download the file first to the server and then upload it to Google Drive?
Thank you
I doubt if you can 'make' google drive get file from an external location...
However you do have an option to create a shortcut to the external file, if that suits you.
Also, If you wish continue direct upload you may refer this.
As far as I know the API doesn't allow to push files from another referer than the one that's calling the API. So, long story short:
First you need to download the file to your server, then upload it to gDrive from your server.
Read here more: https://developers.google.com/drive/examples/php#saving_files
Or here: https://developers.google.com/drive/manage-uploads
I am using an API to add text to images which requires a URL to the image. I want to upload my images on imgur so that i have valid URL to use. I am using a php script with imgur as it is a part of an app. Since am using PHP I can easily use command line utilities. Please suggest some solution to this problem.
PS : Don't suggest using PHPGd or imagemagick to add text to image. They do not cater to my need. Also I tried google but most results assume upload to be upload on localhost/server while I want to upload on the net to have a valid URL to use. Also i dont think I have the technical know-how to use a VPS for this purpose.
If you're looking to use HTML/php to allow a user to upload a file to your server, here's a tutorial:
http://www.tizag.com/phpT/fileupload.php/
Please note that this process is unrelated to any image processing you might later perform with a tool such as ImageMagick or GD.
Edit: if you want to use php to make an image available on the Internet, Flickr is not a bad choice:
Uploading a photo with Flickr
ImageMagick is an image manipulation library. It has no functionality to upload files anywhere.
If you want to upload files, then you will need a service to upload them to (finding such a service is off-topic for SO, creating one is too broad for SO, finding hosting for one you create is off-topic for SO).
That service will provide some sort of API (although perhaps not one intended for automated access) which you will have to write a client to interact with.
If said service uses HTTP for uploads, then you should look at the cURL library.