##// END OF EJS Templates
Updating MANIFEST.in for new examples location.
Updating MANIFEST.in for new examples location.

File last commit:

r9191:e02443f1
r9192:86ee6d03
Show More
Local Files.ipynb
53 lines | 1.9 KiB | text/plain | TextLexer

Local Files

The above examples embed images and video from the notebook filesystem in the output areas of code cells. It is also possible to request these files directly in markdown cells if they reside in the notebook directory via relative urls prefixed with files/:

files/[subdirectory/]<filename>


For example, in the example notebook folder, we have the Python logo, addressed as:

<img src="files/python-logo.svg">

No description has been provided for this image

and a video with the HTML5 video tag:

&lt;video controls src="files/animation.m4v" /&gt;

<video controls src="/files/animation.m4v" />

These do not embed the data into the notebook file, and require that the files exist when you are viewing the notebook.

Security of local files

Note that this means that the IPython notebook server also acts as a generic file server for files inside the same tree as your notebooks. Access is not granted outside the notebook folder so you have strict control over what files are visible, but for this reason it is highly recommended that you do not run the notebook server with a notebook directory at a high level in your filesystem (e.g. your home directory).

When you run the notebook in a password-protected manner, local file access is restricted to authenticated users unless read-only views are active.