from the book http://web2py.com/book/default/chapter/04#URL
For the reasons mentioned above, you should always use the URL function to generate URLs of static files for your applications. Static files are stored in the application's static subfolder (that's where they go when uploaded using the administrative interface). web2py provides a virtual 'static' controller whose job is to retrieve files from the static subfolder, determine their content-type, and stream the file to the client. The following example generates the URL for the static file "image.png": URL('static', 'image.png') is mapped into /[application]/static/image.png If the static file is in a subfolder within the static folder, you can include the subfolder(s) as part of the filename. For example, to generate: /[application]/static/images/icons/arrow.png one should use: URL('static', 'images/icons/arrow.png') Il giorno venerdì 30 agosto 2013 21:29:28 UTC+2, wiel ha scritto: > > > I tried to add a bulk of .js files to my static folder without using the > admin interface. the files are not showing up in the admin interface and a > couple of these files are giving a 404 not found error. how can I remedy > this? > > here is a sample of the view file. I placed the .js files in a sub folder > > <!-- The Iframe Transport is required for browsers without support for XHR > file uploads --> > <script src= > "{{=URL('static/jQuery-File-Upload','js/jquery.iframe-transport.js')}}" > ></script> > <!-- The basic File Upload plugin --> > <script src= > "{{=URL('static/jQuery-File-Upload','js/jquery.fileupload.js')}}" > ></script> > <!-- The File Upload file processing plugin --> > <script src= > "{{=URL('static/jQuery-File-Upload','js/jquery.fileupload-fp.js')}}" > ></script> > <!-- The File Upload user interface plugin --> > <script src= > "{{=URL('static/jQuery-File-Upload','js/jquery.fileupload-ui.js')}}" > ></script> > <!-- The main application script --> > <script src="{{=URL('static/jQuery-File-Upload','js/main.js')}}"></script> > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.