How to display html file stored in local PC from chrome app? - google-chrome-app

I want to display a html file stored in local PC in another HTML. How do I do that? I tried using iframes and giving file:/// protocol. It gives me Not allowed to load local resource: error.

In a Chrome App, to access local files / folders you need to use the chrome.fileSystem API and get the user to select the file/folder for you (works as access approval that you can retain for later).
You can't use file:/// from a Chrome App.

Related

How to pull URL from open web browser in MATLAB?

Need to pull URL from current web browser using Matlab. URL is a google maps URL that is constantly changing as the user moves around. Matlab code needs to be able to work in conjunction with the open google Chrome tab and pull the changing URL when the user specifies.
Not sure how to attack this - have tried using the web function but the google maps is running in Chrome, not the default matlab browser.
I’m trying to get away from my current method, which is copying and pasting the url from chrome into matlab every time there is a change.
Thanks in advance!

Remove the auto download of a URL that points to a google bucket

I have files stored on google cloud storage. Google provides me a URL to access this files, but when I access this URL the file is auto downloaded. I wish to know if it is possible to remove or don't allow this auto download when we access the file URL. ;)
The download feature is handled by the client.
Calling the URL for an object stored in a bucket will return the object in the body of the HTTP request, and the client will choose what to do with this data.
If you use a web browser, the choice of downloading or not a file is usually given by the header Content-Type. In general, there are some MIME types that will be displayed on the browser itself (according to Chrome help, videos, images, PDFs and web pages will be displayed directly on the browser), while others will download directly.
To modify the MIME type of the files stored in a bucket, you must change it's metadata, so the browser will behave in the way you want.

Redirect loop error when trying to open a txt file on G cloud storage?

I'm trying to view some .txt files on my Google Cloud Storage. But when I click the links, the page goes to a "This webpage has a redirect loop" error on Chrome.
The .txt links were working fine early Dec which is the last time I accessed them, but from then till now something broke.
This can be fixed by clearing your cookies, and it should never happen again in this browser.
If you'd prefer not to clear all of your cookies, you can search for cookies scoped to "storage.cloud.google.com" in Chrome, and clear the "cds" cookies (I suspect you have two - you can actually get by with just clearing the older one, which should be the one whose domain is "storage.cloud.google.com" rather than ".storage.cloud.google.com".

CodeIgniter video files not uploading on web server

I have created a codeigniter application with a file upload feature. This is loaded as my Facebook app in a Canvas page. I have set my allowed types as png,jpg, mp4.
When tested on localhost this works fine and uploads well.
However, when uploaded on my server and installed as my canvas app, when I access my page via apps.facebook.com/myapp, the images are uploaded fine, BUT, when I try to upload a mp4 file, thatwas successfully uploaded on localhost version, it returns the upload error "The filetype you are attempting to upload is not allowed.".
But I have set it as an allowed type.
I tried uploading via the canvas url (www.myapps.com/apps) rather than the canvas page (apps.facebook.com/myapp), but it gives the same problem, it says the type is not allowed.
I thought it might be server not configured so I add AddType video/mp4 .mp4 to the server's and app folder's .htaccess.
Also I made sure that mp4 is added in the mime.php in my codeigniter app.
Just not sure what to do again. It keeps saying it's not allowed, but it is.
Any help would be great. How do I fix this?
Try adding the both mime types in the list in the config folder for codeigniter. Like this.
'mp4' => array('video/mp4', 'application/octet-stream')

hidden folders in Internet

very often in Internet I see links like this:
www.abcde.com/~main/material/hello
and this part ~main/material/hello is grey, if I remove hello I receive access forbidden, can somebody explain, what is this system, and is it possible receive access?
Directory listing is disallowed on www.abcde.com/~main/material/, but you have access to it's content.
They've configured the web server to only allow access to certain areas. You won't be able to receive access to it.
Depends on the web server. On Apache this can be done with
Options -Indexes
what do you mean it is grey? the link text on a page? That can be any colour that the page owner wants, but I don't remember seeing a grey link.
What happens if you type www.abcde.com/~main/material/hello directly into the browser's address window?
If you remove "hello" and receive access forbidden it is because there is no public access to www.abcde.com/~main/materia - give up, you will never access that without a password.
The tilde (~) is *nix convention for a user's home directory. Using it in the URL tells an appropriately-configured web server to look in a directory in the user's home directory for the files to show via the web server.