Closed nesjett closed 6 years ago
Hi,
Some questions.
If its the admin area then you can use the Admin UI (see plugin builder) and use type='files'
If it's for the frontend then I am not completely sure why the filepicker() method doesn't work.
I dont get any error, it works, uploads the file, but when it reloads the modal, the file just uploaded its not there nor in the file system. At first I noticed some kind of bug in the latest stable version, and It was that avatar uploading is not working. At first I thought that it could happen due to file permissions, but now Im wondering if that is related with the filepicker() too.
PD: As a small note, the profile link to update the avatar picture is not working as espected, it has a bad redirect.
I´m using latest stable version, not github one, Ill try to update and see if its solved.
I´m using latest stable version, not github one, Ill try to update and see if its solved.
That should definitely solve a lot of issues. Hopefully also the one you are experiencing :)
Well, updating the cms to the git version solved the problem about not to be able to upload avatars, but still cant upload files trought the filepicker() if you are not admin (on frontend)
Issue #1933 persists too.
Labelled as bug, this needs to be looked into.
I suppose the filepicker method needs updating to also allow for non-admin users to upload files.
Test code:
<?php
require_once("class2.php");
require_once(HEADERF);
$sql = e107::getDb();
$ns = e107::getRender();
$frm = e107::getForm();
$text = '';
if(isset($_POST['formname']))
{
print_a($_POST);
$ns->tablerender("Test form", "Submitted!");
}
else
{
$text .= $frm->open('formname', 'post', e_REQUEST_URI);
$text .= $frm->filepicker('test', '');
$text .= $frm->button('formname', LAN_SUBMIT);
$text .= $frm->close();
$ns->tablerender("Test form", $text);
}
require_once(FOOTERF);
exit;
Please see http://www.w3schools.com/tags/att_input_multiple.asp and e107::getFile()->getUploaded();
Is there any form function or shortcode to add a multifile uploader?
Also, I tried using the filepicker() method, but it doesnt allows the upload to non admin accounts. Maybe am I missing some param/config...?
Thanks,