Recently Browsing 0 members
- No registered users viewing this page.
By Andreas Augustin
Can I deactivate the renaming feature of images and the editing (croping, rotating etc) in the processwire admin panel?
I was thinking about writing a module: Enabling PW to index and search contents of uploaded files.
I know the easiest way to include search-inside-files capability is to use Google CSE. Developers who have a dedicated server may of course use of of the "big boys" of search like Lucene, ElasticSearch, Solr etc. For ES you'll need Apache Tomcat, which most people don't have at their disposal, etc.
So, my question is, first of all: Would such a feature be used at all? I know you can create some sort of meta-search with file-descriptions, or when using the "one page per file" approach.
After some brainstorming, I came up with this:
Make it possible to search file upload content (PDFs, Word, Excel)
Build a module (d'oh)
select templates / file-fields (what to index) - list all inputfields type "file"
“index now” button or “index each time a file is added” or cron? Performance?
Where / how to store indexes?
As a separate, new field inside each page? On the file-system? In the module folder, each file has a related JSON file? (similar to language files) A new, separate DB-table?
What we need:
filename / path / URL filetype (to customize search results with file-icons) page id extracted content timestamp of last index-build? MD5/SHA hash or some such? How to handle user roles when doing actual search? Inherit from page? Inherit from file-field?
So, what do you think? Not worth it? Does something like this already exist (I searched, but found nothing)?
We have an internal company site that we use to document specifications for software development. Currently, we use Adrian's ProtectedMode module to restrict the site to logged-in users, but one of the engineers just noted that uploaded files are (naturally, given the scope of the module) visible without authentication. While this isn't a huge risk (you have to know the URL to view an uploaded file), it is technically a security issue since we have lots of proprietary things attached to pages on the site.
Any ideas on how I could lock down these files so you have to be logged in to view them?
On the site for a game development collective I'm part of, I've been trying to add the ability for our developers to attach game builds from Unity (a 3D game engine and development environment) to blog posts. Unity cranks out an HTML file with everything ready to go for static hosting, so I've simply added a file field in the blog post template that accepts the four files Unity exports, one of which is jquery.min.js.
Obviously, this is highly redundant, having the content author upload another copy of jQuery with each build, but it's actually a more streamlined workflow than the alternative of building a standard Unity player template, which would then require the author to create an additional page in ProcessWire each time to attach the Unity file.
So I've gone with this redundant but easy approach. However, I've run into a technical snag: Even after explicitly allowing "min.js" files for the field, the file uploader always renames the jQuery file to "jquery_min.js", which is then not found by the HTML file looking for the original name. Is there a way to disable this behavior?
I have cloned (duplicated) a few file input fields today, but found the following odd behaviour:
- Drag'n'drop is no longer possible.
- Trash icon doesn't display in Mac/Safari + Mac/Chrome.
- I can't delete any uploaded files anymore.
Filetypes are usual stuff / allowed file-types (PDF mostly) etc.
PW 2.3.2 dev
Files are visible in the backend and in the DB.
Tried on Mac Safari + Win Google Chrome (in the latter, the trash icon is fine)
Due to a large number of input fields, we've resized the input field width to 50 or 25%, but changing them back to 100% didn't do anything.