Search the Community
Showing results for tags 'Uploading'.
-
Hello dear PW gurus. I have stumbled over a strange error that i all of sudden got when trying to upload an image to a images field on a page. There where images allready stored in the field that i wanted to keep, but during the upload the error apear and after that all images are gone from the field and i can´t upload any, i just get the error every time. I am running ProcessWire 3.0.153 dev. Update: After looking in the assets folder i find the folder for the page and the image files seems to be there including the ones i tried to upload when the error occured. But they don´t show up in the images field in the page editor. The error reported: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'ratio' at row 1 And here is a screenshot of the event: The TracyDebugger Error reporting: I hope you fine folks could point me in a direction. But it seems our old pal set_time_limit() is back. Regards, EyeDentify
-
Hi everyone, I am new to Processwire and am hoping that you will be able to help me out. I have currently taken over a website from one of my colleagues and have been asked to implement a gallery. I have created the appropriate fields and code but have come across an issue when trying to upload images to the field. Initially I uploaded multiple images of varying sizes and I found that the loading bar reaches the end very quickly then the loading icon/graphic just continues to spin, I waited for an hour or so for them to load but it never did, it just kept spinning. I then reloaded the page and the images were not shown in the field. I decided to then upload one small image (roughly 200KB) and again it did the same as above. I left the site 24 hours to see if it would fix itself. However when that time had passed and I tried again it failed again. I asked my colleague if he had any issues with uploading images but apparently it was fine when he was using it. Does anyone know what is causing this and if there is a fix? See attached image. Thanks, Matt
-
I'm building a smartphone app that allows users to record a voice clip and send it to our server, which runs ProcessWire. Files are sent over HTTPS Post, currently without any sort of authentication. I've succeeded using the WireUpload class to fetch the uploaded file from the $_FILES super global. Where I get in trouble is when I try to add the audio file to the audio page, where there's an Input field called 'audiofile'. Whenever I try to use any file related method, an Internal Server Error occurs. Here's my code, which runs in the page's template. <?php Header("Content-Type: text/plain"); $upload_path = $config->paths->assets . "files/audio/"; $u = new WireUpload('files'); $u->setMaxFiles(1); $u->setOverwrite(false); $u->setValidExtensions(array('mp3', 'mp4', 'm4a')); $u->setDestinationPath($upload_path); // I can confirm through my FTP client that the file sent through POST actually shows up in the $upload_path location. $fileresult = $u->execute(); // This is the File input field in my template. Doing print_r($audiofield) confirms this is an existing object. $audiofield = $fields->get("audiofile"); // Trying this for the heck of it, but all that results is HTTP 500. $audiofield->deleteAll(); foreach($fileresult as $filename) { // I've seen various examples on what to do now. Here's one that causes a 500 error. $page->'audiofile' = $upload_path . $filename; // This seems the most logical thing to do, but also causes HTTP 500. $audiofield->add($upload_path . $filename); // Unlinking succeeds (given that I comment out the lines that cause the HTTP 500 errors) unlink($upload_path . $filename); } // We never get to this phase. $page->save(); ?> Things of note: Server runs PHP 5.4.4-14+deb7u8 on Debian with Apache/2.2.22. File uploading through the admin on the audio page works without issues, also when uploading multiple files at once or sequentially. I've confirmed the owner of $upload_path to be www-data and its permissions to be 755. What's the final step I'm missing to add the audio file to the input field on my page?
- 6 replies
-
- WireUpload
- FieldTypeFile
-
(and 5 more)
Tagged with:
-
Hi, I have an image field, the "decompress zip files" box is checked and "Max files" is set to "0". I´ve set "zip" as an allowed file extension, since otherwise the upload field did not accept zips. So I can upload zip files now. But the contained images are not displayed in the "select image" dialog when trying to add them with the editor. I suppose they have not been unpacked. The page´s folder in /site/assets/files/ is still empty. When I upload zip files to my server using the cPanel file manager or ftp I can unpack them on the server. So I´m not sure, it may still be a server setting that prevents automatic unpacking. I guess I can ask my server support. But maybe someone here knows something? Thanks!
-
Quick question! I have everything prepared. I created the web locally with my MAMP. So I have a web working perfectly with CMS processwire, locally. I want to upload this to a hosting server. I suppose I have to install again processwire in this server, or not?. UPloading all these files via FTP to the online server will be enough? Or if I upload via FTP all my files I will still have to create all the fileds again in the online hosting? Or will thee settings be automatic? Pleas let me know what I would have to do? Thank you very much! Dani