Hello,

I've got a Typo system running that was created on 4.5, which I upgraded to 7.6 
over the last weeks. The original maintainer created an extension with 16 
plugins - Fluid is not being used here, it's generating simple HTML-Content via 
PHP and returning that.

That procedure is plain old and not advised today, I know, but I don't have 
enough time or knowledge to re-work the whole projekt using Fluid/Extbase.

The page is pretty much finished, but a new request got in last week - a page 
being filled by `pi16` should contain a simple image upload. Using the simple 
file input of HTML forms would be enough. My code currently looks like this:

/////////////////////////////////
$is_submitted = (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('submitted') !== 
null);

if($is_submitted) {
   $postval = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP();

   var_dump($_FILES);
   print_r($_FILES);

var_dump($postval); }

$content = '
<form type="POST" action="index.php" id="fu_form" class="form-inline">
   <strong>Bild hochladen</strong>
   <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
   <input type="file" name="file_img">

   <input type="submit" name="submitted" text="Abschicken" />
</form>';

return $this->pi_wrapInBaseClass($content);
////////////////

var_dumps and print_r are returning this, in order:
array(0) { } Array ( )
string(7) "img.jpg"



The $_FILES-Array is empty and I can't use the POST object to upload files. 
I've been working on this for 4 days, tried different things (using Fluid in 
pi-Extension, implementing a form as external template, etc.) but haven't been 
successful yet.

It would be awesome if someone could point me in the right direction as I'm 
really not getting any further - thanks in advance to anyone trying to help!


Best regards

Niklas
_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to