Upload a code snippet

Code snippet

You can now upload or type programming codes directly in your WorkDrive account. Simply copy a code from any external source and paste it to your Team Folders or My Folders to open the code in a snippet dialog box. 

The auto detect code feature in WorkDrive will identify the programming language based on the code you have entered. However, you can also choose the language from the available options.
  1. Click New and select Code Snippet.
  2. Type or paste a code snippet in the space provided. 
  3. Click the Auto detect code dropdown to choose your code language.
  4. Enter a file name and choose a location to save the file. 
  5. Click Upload.


Info
Currently, we support 28 programming languages.
Apache
Bash
Batch
C#
C
C++
CSS
CoffeeScript
Deluge
Fortran
Go
HTML
Ini
Java
JSON
Jsp
Javascript
Makefile
Markdown
Objective-C
PHP
Perl
Python
Ruby
Rust
SQL
Text
XML

Code Editor

WorkDrive now features a built-in Code Editor, enabling you to view, edit, and manage your code files seamlessly without leaving the platform. With this integrated editor, you can easily update code snippets directly in WorkDrive, removing the need for external tools.

To edit the saved code snippets:
  1. Select the code file you want to edit.
  2. Click on the More Actions icon (...) located in the top action bar.



  3. Choose Open with > Code Editor. This will open the file in the built-in Code Editor.



  4. Make the required changes to your code in the editor.
  5. Once you're done, click the Save button to update the original file with your changes.
    Alternatively, if you want to keep the original file intact, click the Save dropdown and select Save as a copy to save the modified file as a separate copy.
Info
Supported file formats for Code Editor

Zoho WorkDrive’s Code Editor supports 144 different file formats, including:

1c, adoc, ahk, aj, al, ald, alf, applescript, armasm, as, asciidoc, atom, au3, bash, bat, bf, c, capnp, cc, ceylon, clj, cmd, coffee, coffeescript, conf, conf, conf, cpp, cr, cr, cs, cson, css, d, dart, delphi, diff, dos, ds, dust, elm, erl, f90, f95, fs, fs, glsl, gms, go, golo, gradle, groovy, gsh, gvy, gy, h, haml, handlebars, haxe, hbs, hpp, hs, html, hx, iced, ini, irb, irpf90, java, js, json, jsp, lasso, less, lisp, log, lua, mak, md, mel, mk, mkd, mkdown, ml, ml, mli, mli, mm, mma, nb, nc, nsi, nsis, objc, oxygene, pde, perl, php, php3, php4, php5, php6, pl, plist, profile, prop, properties, proto, py, rb, rbw, rib, rs, rsl, rss, ruby, scad, scala, scm, scpt, scss, sh, sql, ss, st, styl, swift, tex, tex, thrift, ts, twig, typescript, v, vala, vb, vbs, vim, xhtml, xml, xpath, xq, xsl, zsh

Notes
Limitations:
  1. The Code Editor is unavailable for files larger than 1 MB.
  2. To edit a code snippet, you must have Editor or higher permission.