How to add a link of a local file on Google Spreadsheet? - windows

I want to add a link of a local file to a cell on Google Spreadsheet. I tried to use "insert Link" and pasted a full path of the file I want like C:\Users\xxxxx\Desktop\xxxxxx\xxxx.cpp.
However, it says,
Link doesn't look right. Typo?
Is it not possible to add a link of local path?

When I open a local file with a browser, the link starts with
file:///C:/(....)/
because you acces a local file with no network protocol. Maybe you can put the file into the same directory and use relative links.
Sure you know that you won't be able to access that file from the web without further actions relating your internet connection.
In this case, you might need to setup a http-Server;
use Windows' IIS (internet information services);
or just rent a hosting server.
Have fun!
Edit: This might also be useful:
HYPERLINK Creates a hyperlink inside a cell.
Sample Usage HYPERLINK("http://www.google.com/","Google")
Syntax HYPERLINK(url, [link_label])
https://support.google.com/docs/answer/3093313?hl=en

Related

How can I upload multiple files from urls directly to cloud storage

I've tried some of the services out there, including droplet, ctrlq.org/save, and some other sites that support directly fetching a file from a url and uploading it to dropbox, google drive and the like. Without the user having to store the file on a local disk.
Now the problem is none of these services support multiple urls or batch uploading, but I have quite a few urls and I really need a service where I can put them in, split them with enters or semicolons, and have the files uploaded to dropbox.(or any other cloud storage)
Any help would be gladly appreciated.
The Dropbox Saver JavaScript control allows you to save up to 100 files to the user's Dropbox in one shot. You'll need to programmatically create the button using Dropbox.createSaveButton as explained in the linked page.
It seems like the 100-file limit (at any one time) is universal, but you might find that it isn't the case when using the DropBox REST API. It looks possible to do this with NodeJS server side (OAuth and posts) or Javascript client side (automating FileReader). I'll review and try to add content so these aren't just links.
If you can leave a page open for about 20 minutes due to "technical limitations", the dropbox should be loadable 100-at-a-time like that, assuming each upload takes less than 2 seconds; it's an easy hook to add a progress indicator.
If you're preloading the dropbox once yourself or the initial load is compatible with manual action, perhaps mapping a drive and trying to unzip an archive of your links to it would work. If your list of links isn't extremely volatile then the REST API could be used to synchronize changes.
Edit: Forgot to include this page on CloudConvert, which unzips archives containing up to 100 files into DropBox. Your use case doesn't seem to include retrieving the actual content at your servers (generated zip files), sending the automation list to the browser and then having the browser extract to dropbox, but it's another option.
The Dropbox API now offers the ability to save a file into Dropbox directly via a URL. There's a blog post about it here:
https://blogs.dropbox.com/developers/2015/06/programmatically-saving-a-url-to-dropbox/
The documentation can be found here:
https://www.dropbox.com/developers/core/docs#save-url

Path: Shared Users & Drive

I have been trying to create a link, you can say either as an hyperlink or a kind of automation that is like I have a template which I paste it to my Gmail message and send it out to my team.
When they receive my mail they just have to click the path mentioned in the template. When clicked I want the exact folder to be popped out for them instead of going through all the locations and then to the destination.
So my question is: Is there a way for me to give away the path a link, so that any shared user can click and open the exact folder at the same time in any number of computers?
Example: C:\Users\ketan\Pictures\a\”destination” - An hyperlink to these kind of URL's should take them to the “Destination” directly in one click
Handling such link is usually considering a security issue inside a web browser, as it can allow to discover arbitra.ry resource on the local machine/ local network. So having such link is usually discouraged.
if you are only considering local resource the file:// protocol handler would be sufficient, but in most can the link would be handled by the internet browser (link to a file would trigger a download from the local filesystem, link to a directory would display a file list of the directory), and not the file manager.
Mail client usually handle html links via the default web browser.

Realtime drive javascript example not working - Google API

I set up the Realtime drive example shown here: https://developers.google.com/drive/realtime/realtime-quickstart
On this site: http://shuub.com
But the thing is, that when I access the link from a different browser (logged in a different Google account), it won't load the file.
All I need is to edit some plain text with another user, without needing to access a google account, it doesn't even need to be saved after closing the site. Is it possible?
Thanks for reading.
But the thing is, that when I access the link from a different browser
(logged in a different Google account), it won't load the file.
Probably you need to share the file with the other user first.
Open Google Drive in your Browser. If you did not modify the example code, your file should be located in the root folder. It's probably named "New Realtime Quickstart File". Right-click on the file and share it with the other user by adding his account to the list and granting all permissions.
All I need is to edit some plain text with another user, without
needing to access a google account, it doesn't even need to be saved
after closing the site. Is it possible?
The website you have linked is not reachable so I don't know what you want to do exactly.
Probably you could also use other and (in that use case without saving and login) simpler techniques like Mozillas TogetherJS (you can try it on jsfiddle.net) or you could use a tool like Etherpad.

Generating a jwt in Google Wallet

I don't understand how they are generating the jwt in tutorial #1.
Is it a call to a JavaScript function?
Honestly, the library link didn't connect the dots completely for me either. Especially when you're going from Google Checkout, which takes 10 minutes to set up, to Google Wallet that requires JSon/JWT knowledge.
So, I went to the Samples link instead and found all references to "Cake" in the code, per their demo. Link to sample code.
------- Digital goods sample app (PHP) ---------
I am using PHP, so I downloaded iap-php source at the this link. And clicked the Download .zip link. It's not very obvious on the page and the window will show you a message that says, "No files in the selected directory. Select a subdirectory, if one exists, or another directory from the tree on the left." Don't worry; just find that little Download: .zip link in the Source tab.
When I opened the files, I saw seller-info.php to enter my specific issuerID (also called your merchant id) & secret. Replace that red text with your info.
generate-token.php is where you change the red text to information about YOUR product.
index.php is where you change the same product information that appears on the page that the user first sees. When you put this on another page, inside of your live website, be sure to include all of the scripts.
The Tutorial says that it's generating the JWT server side and has a link to server libraries (in multiple languages) that can do the generation for you.

Logging image downloads

I'm trying to find a way of finding out who is downloading what image from an image gallery. Users can download using a button beside the thumbnail or right click and use the "save link as" Is it possible to relate a user session or ID to a "save link as" action from all browsers using either PHP or JavaScript.
Yes, my preferred way of doing this would be via PHP. You'd have to set up a script which would load up the file and send it to the user browser. This script would also be able to log the download somewhere (e.g. your database).
For example - in very rough pseudo-code:
download.php
$file = $_GET['file'];
updateFileCount($file);
header('Content-Type: image/jpeg');
sendFile($file);
Then, you just have your download link point to download.php instead of the actual file. (Note that updateFileCount and sendFile are functions that you would have to provide, of course - this script is an example of a download script which you could use)
Note: I highly recommend avoiding the use of $_GET['file'] to get the whole filename - malicious users could use it to retrieve sensitive files from your web server. But the safe use of PHP downloads is a topic for another question.
You need a gateway script, like ImageDownload.php?picture=me.jpg, or something like that.
That page whould return the image bytes, as well as logging that the image is downloaded.
Because the images being saved are on their computer locally there would be no way to get that kind of information as they have already retrieved the image from your system. Even with javascript the best I know that you could do is to log each time a user presses the second mousebutton using some kind of ajax'y stuff.
I don't really like the idea, but if you wanted to log everytime someone downloaded an image you could host the images inside a flash or java app that made it a requirement to click a download image button. That way the only way for them to get the image without doing that would be to either capture packets as they came into their side or take a screenshot.
Your server access logs should already have the request for the non-thumbnailed version of the file, so you just need to modify the log format to include the sessionid, which I presume you can map back to a user.
I agree strongly with the suggestion put forward by Phill Sacre. For what you are looking for this is the way to go.
It also has the benefit of being potentially able to keep the tracked files out of the direct web path so that they can't be direct linked to.
I use this method in a client site where the images are paid content so must be restricted access.

Resources