matjazp Posted June 2, 2014 Share Posted June 2, 2014 I have a page with files (attachments). I would like to allow a user to add files as simple as possible. I don't want to give the user full access to admin. So click on the link/button "Add new attachment" would open modal with login form, after successful login a file upload would be presented to the user and he would upload the file. Thanks for any hints. Link to comment Share on other sites More sharing options...
horst Posted June 2, 2014 Share Posted June 2, 2014 I think there are already lots of thready / posts that covers that: just google Link to comment Share on other sites More sharing options...
matjazp Posted June 3, 2014 Author Share Posted June 3, 2014 horst, thx for the hints. Another question: how to "move" individual file object from one File field to another File field without removing the file itself? Eg. have a page with two fields: files (multiple files are allowed) and onefile (maximum file upload = 1). User is allowed to access just onefile (I'm using fredi), he uploads the file and then this new uploaded file should get appended to other files: if($page->onefile && count($page->onefile)) { $page->setOutputFormatting(false); $page->files->append($page->onefile); $page->save(); $page->setOutputFormatting(true); } Now I would like to "empty" onefile field (to be ready for the nex upload) but without deleting the actual file itself. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now