I'd like to be able to upload a new spreadsheet to my drive remotely from my server as needed (using Google's PHP Drive API, say), and it to trigger to run once daily at a given time, then read that spreadsheet remotely once a day after the script runs. I want to fully automate this. I don't want to have to manually install the sheet and set up the trigger for each.
The guides, API, tutorials I've found have not been very clear about how to specifically upload a spreadsheet with an associated script and set triggers. Is this possible? And how do I go about it? If there are some good resources I've missed, much appreciate pointing me to them.
Thanks.
There is no way yo "upload" a Google spreadsheet from a local server since they are online documents. You could use a template that has an embedded script but the script would require authorization to run so it won't fit your requirement neither.
Why don't you use a standalone script (or an embedded script in a "master sheet") that would do what you need to do in all the spreadsheets you create (or even upload/convert from ods or excel files with data) ?
One single script can access any number of spreadsheets and do about everything an embedded script can do in these sheets while requiring only one single authorization. This script could create the files and work on a daily timer to do the job.
Related
I have finished an object detection project and I want to make a demo of it with a web application. I use YOLOv3 on Darknet for training. I intend to get the weights that I got from the training and use it in the web app. I decided to allow the user to upload an image, then take that image through a Python script, which will load my trained weights and do the detection. I decided to use PHP for the server-side and test everything on the localhost first.
I am totally new to web application and I don't know if I decided right
It is possible to do that..here are headlines to get you started
>First create the image upload form
>PHP script to first move the image to a folder accessible to .py for processing
then execute the .py script
>Save the result of the processing to a log (.json works best with php)
>Decode the .json with PHP
>if you need to do calculations with PHP, do so
>Lastly give the user the results they expect to get
I want to get the size of a folder in Google Cloud. I know I can do this by retrieving all files and loop through the files and summarize all files sizes, but this is a time consuming action. I want to do this through an API.
Is there any function for this?
No, there is not. You'd either need to compute it when needed or keep a running tally via notifications.
I am trying to allow the user to download a file.
When the file is downloaded it is displayed in the browser window instead of downloading it.
Does anyone know of a way to get the iPhone to download files instead of viewing them.
Also all the code that I have tried works great on Android Devices.
Thanks.
You can't. Apple have deliberately prevented things like this to protect their iOS from hacks and malware; you have no access (unless you are a developer, in which case its restricted) to the handsets integrated data storage.
Are you writing a program that downloads an image, or trying to do this as a user?
If you're writing a program, you can only download files to a limited number of locations. Your app's documents directory is the most obvious choice.
You will need to create an NSURLRequest, and then an NSURLConnection, and then implement a number of delegate methods to handle the incoming data. Then you'll need to use NSFileManager methods to write the data to a file.
I am a php newbie so i may be completely off here. But this is what i want to do.
Have a user upload a video to my site.
This then has a 30 second clip from our database added to it.
Which can be downloaded by the user for upload on any third party websites. Essentially the video is a flv or mpeg4, etc. But now with the 30 second clip added on.
These are the key point that make this difficult though.
I would want for certain links that are attached to the video file that is downloaded to be clickable from whereever it is uploaded to.
I would want for the 30 second slot to not be fast-forwardable. (Like on the youtube ads). <- I know they use FLASH for that./ But i would need my videos to be functional anywhere and youtube videos cant do that without attachment to youtube.
(This is something i intend to build myself. I just need your help in figuring out HOW to do it.)
All answers are GREATLY appreciated.
Thanks Alot!!
The challenges you bring up are not something you would ideally fix with PHP knowledge per se. PHP doesn't offer any video editing capabilities of its own, so you would effectively have to use PHP to run some other utilities.
The only PHP aspect here, really, is receiving an upload from the user, executing an external command on the uploaded file, and providing it as a download again. Those are the only parts of this process that I think you can realistically do with PHP alone, and they are quite easy. If you want to figure those out before you figure out the video editing aspect, then find information about making PHP receive a file from the user, how to make a PHP script downloadable instead of a page, and how to execute external commands.
That said, there are command-line utilities out there which you can use PHP to run on the file. I suggest you check out 'mencoder'. I've only used it a couple of times myself to do some video encoding conversions, but that's the first thing that comes to mind. It doesn't matter what you find... provided that it's a command-line utility, you can make PHP use it, even if you're running Windows as a server (imagine that!).
In short; I recommend trying to find command-line utilities that support video manipulation first, forgetting about PHP for a while, then figuring out how to use them, and only then figuring out how to make PHP do what you have to do.
The part with links in the video + no fastforward is not possible in my experience with php or anything else if this is only a video file.
If you go for a full embeded player or at least youtube, then it's possible.
I wish my users could select a directory from their PC and upload all files from this directory, so they could upload whole album(directory) instead of uploading every single file separately.
I would like to ask you if this is somehow possible using PHP or JavaScript and without using any framework.
thank you
First of all, PHP can't do anything to the user's local computer. Since it never runs there (unless the user's computer is the server also).
JavaScript runs on the user's local computer but isn't setup to handle things like this.
Java and Flash runs on the user's computer and can be setup to do exactly this.
Look at SWFUpload. I highly recommend it.
And if you want Java, check out RadUpload. The lite edition is free.
A thing to note, what these Flash and Java solutions both do is accept a file selection from the user and then send that to a PHP script which does the actual uploading.
It would probably make more sense for them to upload a .zip containing multiple images - which is possible in PHP.
I do not think it is possible as you describe it. Create a small utility which they can run on their PC that will do the job. Also check out how Facebook upload image works. They upload dozens of images at the same time.
Not possible using purely php/javascript. However, take a look at http://www.element-it.com/JavaPowUpload.aspx, it is a java-based file uploader that allows you to completely hide the interface, and, if you wish, power the whole interface via javascript. However, it is not free, perhaps not suitable for a personal project.
This may not meet your requirement of Javascript, but if you wish you could build your uploader object as an activex object and use CURL to actually perform the upload or do it as a Java applet.
I had built a Java applet based uploader for a client and I found resources on line and used that as my base for building the uploader.
SWFUpload, as mentioned in one of the answers you received is a good one.