Jump to content

Search the Community

Showing results for tags 'upload'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hi! I'm new to ProcessWire and i need a "little" help with my family's website. What i want: The website of my family contains a gallery, where photos are shown in several albums. The current tree looks like this: ---photos ------ New Year 2013 ------ Going to the zoo ------ Dad's 60th birthday ------ Our Pug ------ ... Showing all pictures on one page is no problem for me, i got that working. But the photos should be Instagram-like "commentable" and "likeable". So i have to create a page for every single image, right? My questions are now: what's "the best" way to do this? Is it possible to automate this process? And how? I hope you understand, what i'm trying to do... my english is not that good, school is a few days ago... paulbrause
  2. The resume uploads fine, but everytime I try to access it, it says "this page is not intended for direct access". How would I make it so that link opens the file?
  3. Hi all, I've not been able to upload SVGs into a regular image field, with SVG added in the Valid File Extensions field. The error I'm getting is: Error: Call to undefined function ProcessWire\simplexml_load_string() (line 234 of /var/www/hosts/our_website/Develop/Source/wire/core/Pageimage.php) I tried the ImageRasterizer module, but that didn't fix it. Is there a workaround for folks that don't have the simplexml module installed?
  4. Trying to deploy a PW site to a client's hosting provider. Everything works as expected in development, but on the production host, certain AJAX requests fail. Here's what I'm seeing: 1) I have form on every page which is submitted via AJAX POST to the current page. No matter which page you POST to, it always returns a PW 404 page. 2) AJAX image uploads on the back end return a 200 or 302 for the original request, then spawn a GET request for the homepage. In trying to troubleshoot this, I have found that the host has both suhosin and mod_security installed. They've provided me with a local php.ini to test configuration changes. I've added the following to .htaccess (temporarily): # account-specific php.ini file <IfModule mod_suphp.c> suPHP_ConfigPath /home/[username] <Files php.ini> order allow,deny deny from all </Files> </IfModule> # disable mod_security <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> In the php.ini file, I've set the following directives: suhosin.simulation = On always_populate_raw_post_data = -1 I've also set a specific directory for uploads: upload_tmp_dir = /home/[username]/tmp GD support is included. PW doesn't log any errors, even with $config->debug set to true. This is PW 2.7.3 on PHP 5.6.28. What else should I check?
  5. Hi folks, My maximum file size upload tops at 50Kb, no matter what the browser or OS. My PHP settings are: enabled extensions: imagick, imap , json, mailparse, mbstring , pdo , pdo_mysql and pdo_sqlite options: allow_url_fopen On display_errors Off error_reporting E_ALL file_uploads On include_path .:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php log_errors On mail.force_extra_parameters no value max_execution_time 180 max_input_time 180 max_input_vars 1000 memory_limit 256M open_basedir no value post_max_size 128M session.save_path /tmp short_open_tag On upload_max_filesize 256M These settings here changed based on some tips of other topics on this forum. On the field, there is no min/max image dimensions. Thanks!
  6. Hi. I've been trying to tackle this problem all day. I have my image upload script working well. On computers, I can upload just fine and have the images resized. But when I try to upload from my phone using the camera, I see the file get uploaded to the server, but then when it comes to the resizing portion, it completely fails. No errors to trace. At first I thought it was iPhone related, but reproduced it on my Android phone. It seems to happen with camera taken images (even DSLR). I can create a photoshop image that is a larger image size, and that works. I'm able to call the image itself it and it displays the original image data, the original file is on the server, the code is pretty basic. I first try getting the URL of the first (and only) image: Start $user->avatar->first->url End Result: Start /site/assets/files/1525/profile.jpeg End BUT when I do this: Start $user->avatar->first->size(100,100)->url End I send up with: Start It simply dies with no error to trace back. Even when I have debug turned on, nothing. For the life of me, I can't seem to pinpoint the issue. Has anyone else come across this?
  7. I have a process module like so: public function execute() { $output = 'mad music archive/bulk uploadability management'; $form = $this->makeForm(); if($this->input->post->import) $output .= $this->bulkup($form); else $output .= $form->render(); return $output; } public function ___install() { $mkr = new ImportShorthand(); $p = [[ 'template' => 'admin', 'parent_id' => 2, 'name' => self::PGNAME, 'title' => '[Blaudio] Mgmt', ],[ 'process' => $this, ]]; $mkr->newPage($p); } public function ___uninstall() { $wp = wire('pages'); $pg = $wp->get('template.id=2, parent.id=2, name='.self::PGNAME); if($pg->id) $wp->delete($pg, true); } private function bulkup($form) { if($this->input->post->import) { $form->processInput($this->input->post); return; if(!$form->getErrors()) { $files = $form->get("bla_upload")->value; if(count($files)) { return count($files);/* $bulkload = $bulk_upload->first(); //$bulkload->rename("address-import.csv"); $bulkloadname = $bulkload->filename;*/ }else{ return "No files were found"; } //$this->session->redirect("../edit/?id=$list_id"); } } } private function makeForm() { So far, returning early in the bulkup() function, submitting the form with an acceptable file results in this error message: Upon reloading the page (afresh, without the submitted data; i.e., clicking its link in the nav) this error is displayed within the upload field: I'm assuming this is due to the fact that this is a process page. How do I ensure temporary storage? My goal ultimately is to insert a new page for each valid file. Thanks much in advance.
  8. Hi I have an image field in the back end, that expects multiple images. Now I've added this hook as the files are added: $page->addHookAfter('InputfieldFile::fileAdded', function($event) { $inputfield = $event->object; wire('log')->save('image-resizing', "Resizing "); $image = $event->argumentsByName("pagefile"); $image->size(800,0,array('upscaling' => false)); $image->size(300,200,array('cropping' => true, 'quality' => 80 )); }); It works absolutely fine for a small amount of images, but uploading a large amount doesn't seem to work. No errors are logged either. Now all thes photos appear to have uploaded in the back end, and show the thumbnails, but upon clicking save images are missing. I've checked all my php settings and ensured they are all adequate enough. memory_limit 512mb upload_max_filesize 200mb max_execution_time 300 If I disable this hook, I can upload all images fine. Please could anyone other any insight into what may be causing this issue? Thanks in advance
  9. Hello Forum, I am relatively new to processwire and have been playing around with some simple websites so far with it. I love the simplicity and the straight forward approach to it. I felt "at home" right away! =D The only thing, I just can not get done is implementing a simple post-form in a template. (front-end) I want to get registered users to create content via a simple form. Yes, there are several tutorials in this forum. BUT: I want the file upload to look like the upload in the back-end: - multiple upload - rearrange order of files Is that hard to build? It should be "there"... or do i need to install a module like https://processwire.com/talk/topic/12050-module-jquery-file-upload/ I would like to build it with core functionality. What do you guys think? Can you point me into the right direction? Cheers Stephan
  10. Dear ProcessWire buddies, I am on a tight schedule and I don't have a lot of time for research, so I hope any of you already had a similar case. I have a form and form data will be saved as a new page. How would you go about implementing a nice ajax video upload (with upload progress) on frontend and then adding this video to appropriate page. Besides that, I would need a video playback in cms. For frontend, I guess the fastest would be to use some library -> what is ProcessWire using for it's ajax file upload? Is it reasonable to use this in frontend as well? I have no idea how to make a video player in cms. Probably with a custom field type, that would then render a html5 video element if video is present. Is there any documentation on creating something like that? I hope you will be able to help me, Thank you all!!
  11. Hi, i'm quite new to processwire and have been getting on very well with it. I've noticed an issue when I upload an (exported from Photoshop) PNG with alpha via the image field. The original file was only 34kb, but after uploading its now 138kb? Can anyone help me figure out whats going on? I've searched Google and the forums, but could not find an answer. This doesn't seem to happen with JPEGS. Thanks in advance!
  12. Hello, I am building a frontend form following Soma's great example on a PW 2.7.2 stable install. The pages that I edit with the form already exist. My form includes a single image field, CKEditor fields and some normal text fields. The form renders fine, all CSS and JS is in place. I can even use the pwImage plugin on the CKEditor field and it loads the image from that page. When there already is an image present in the image field and I submit the form, I get this error: Fatal error: Exception: Method Pageimage::path does not exist or is not callable in this context (in /var/www/utgpwnew/wire/core/Wire.php line 358) #0 [internal function]: Wire->___callUnknown('path', Array) #1 /var/www/utgpwnew/wire/core/Wire.php(398): call_user_func_array(Array, Array) #2 /var/www/utgpwnew/wire/core/Wire.php(333): Wire->runHooks('callUnknown', Array) #3 /var/www/utgpwnew/wire/core/Wire.php(337): Wire->__call('callUnknown', Array) #4 /var/www/utgpwnew/wire/core/Wire.php(337): Pageimage->callUnknown('path', Array) #5 /var/www/utgpwnew/wire/modules/Fieldtype/FieldtypeFile.module(119): Wire->__call('path', Array) #6 /var/www/utgpwnew/wire/modules/Fieldtype/FieldtypeFile.module(119): Pageimage->path() #7 /var/www/utgpwnew/wire/core/Wire.php(459): FieldtypeFile->hookProcessInput(Object(HookEvent)) #8 /var/www/utgpwnew/wire/core/Wire.php(333): Wire->runHooks('processInput', Array) #9 /var/www/utgpwnew/wire/core/InputfieldWrapper.php(636): Wire->__call('processInput', Array) #10 /var/www/utgpwnew/wire/core/Inp in /var/www/utgpwnew/index.php on line 248 If the image field is empty, I get this error on submit Fatal error: Call to a member function path() on a non-object in /var/www/utgpwnew/wire/modules/Fieldtype/FieldtypeFile.module on line 119 If I change the image field to hold more than one image, I don't get the error and the form submits fine with and without one or more images in the field From debugging I see that the error is triggered from $form->processInput($this->input->post); So the code does not work on single image fields. Is there a way to fix this? Any help would be much appreciated.
  13. On my dev (localhost) my gallery appears to be working just fine. It is set to "Automatic", and if I drop in 8 images all of them upload in the order I selected and all save out. However on my production server, the images upload all out of order and then it deletes 4 of them. Has anyone else had this issue or know how to solve it?
  14. When i'm uploading multiple Images in backend everything looks fine first. - All Images are uploading - All Images are shown as Thumbnails but after saving, about 50% of the images are gone. For Example: I upload 10 images, every image is shown in the form, but after saving i have just 5 or 6 images assigned. I don't get any errors, not in Developer Console, not in PW logs, no PHP Errors If i drag and drop them one after on the upload area (same files) and wait until thumbnail is shown and then save the form, everything works fine. If i try the same form local on a XAMPP installation, everything works fine. Any idea ?
  15. Hey guys, I'm really really desperate for help at this stage, for my own sanity mostly. I've been trying to set up a form that requires several fields one of which is a file upload, the user can upload max 10 files with extension jpg/png/jpeg and these are sent to the admin email as attachments. Currently this i am using the InputfieldFile module, I have moved it over to /site/modules because hooking the return html wasn't enough for my needs. So basically I have this. $images = $modules->get("InputfieldFileCustom"); $images->attr('label', "Upload your images"); $images->required = 0; $images->maxFiles = 10; $images->attr('id+images','image'); $images->attr('placeholder','no file selected'); $images->attr('extensions','jpg'); $form->append($images); I expected output that would allow me to upload and delete files. Except right now my biggest issue is the fact that the remove button isn't being displayed because the ___renderItem method isn't being run and I have no idea how to make this work. I'm going to have to do a lot of fun stuff with the markup for the majority of the render methods but I can't do anything until I get the remove button to display. I also made a inputfieldfilecustom.js which is imported on the page. I've renamed all instances of InputFieldFile to InputFIeldFileCustom (in both js and module) Begging for help around now. it would be incredibly appreciated if someone can give me any direction.
  16. I know how to create pages with the API. I need help with the form itself. Here's what I'm working with so far, hacked together from examples found in this forum: <?php $upload_path = $config->uploadTmpDir; $out = ''; // create a new form field (also field wrapper) $form = $modules->get("InputfieldForm"); $form->action = "./"; $form->method = "post"; $form->attr("id+name",'upload-form'); // create file field $field = $modules->get("InputfieldFile"); $field->label = "Audio File"; $field->attr('id+name','audio'); $field->description = "Upload your track(s)"; $field->destinationPath = $upload_path; $field->extensions = "mp3"; $field->maxFiles = 10; $field->maxFilesize = 2*1024*1024; // 5mb $field->required = 1; $form->append($field); // append the field // oh a submit button! $submit = $modules->get("InputfieldSubmit"); $submit->attr("value","Upload"); $submit->attr("id+name","submit"); $form->append($submit); // form was submitted so we process the form if($input->post->submit) { // user submitted the form, process it and check for errors $form->processInput($input->post); if($form->getErrors()) { // the form is processed and populated // but contains errors $out .= $form->render(); } else { // do with the form what you like, create and save it as page // or send emails. to get the values you can use // $email = $form->get("email")->value; // $name = $form->get("name")->value; // $pass = $form->get("pass")->value; // // to sanitize input // $name = $sanitizer->text($input->post->name); // $email = $sanitizer->email($form->get("email")->value); $out .= "<p>You submission was completed! Thanks for your time."; } } else { // render out form without processing $out .= $form->render(); } $content .= $out; That outputs the form but I can't drag & drop or input more than one file, and when I submit it says "Missing required value". I need to at least create one or more pages from the form submission, i.e., one per file uploaded. If possible I'd like to be able to set the title and description for each file/page as well.
  17. Hello, I have a problem with the GD library on the server. When I upload an image I get this error below and half grey images. When I checked the original image it seem to be half uploaded half empty and resized images are grey like in the attachments. Server is ubuntu 14.04, with php 5.5.9 and GD 2.1.1-dev installed. I already tried gd.jpeg_ignore_warning = 1 that I found on many sources. Anyone have any idea? Thanks ahead Parse Error: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: (line 330 of wire/core/ImageSizer.php) EDIT: Uninstalling GD then restarting server and reinstalling again somehow worked.
  18. Is it possible to upload zip file, unarchive it with save it structure? Thanks!
  19. Hi. I've just started using ProcessWire and the first issue I encounter is the lack of possibility to upload files to pages. I can upload images, but not files. I've tried to find an answer in the Forums, but with no success. What to do? Kind regards Hyldig
  20. Hi. i can not upload any image to pages. No error in error log. There is "Uncaught SyntaxError: Unexpected token <" error in Js. i searched all forum, but no result for my problem
  21. Hi all! My first post here, and I'm pretty new to the PW thing, even if I'm falling in love with it . Currently, I'm making a portal with PW and trying to add a few custom fields to the users' profile (image, socials, etc.). The issue here is that I'm able to add custom fields to the user profile, but PW doesn't save the values into these fields. It does let me insert the text or upload the image, but doesn't stores them into the database. And no error is printed out. By looking into the network traffic I did find that in some case it returns a JSON response: {"error":false,"message":"AJAX Page not saved (no changes)"} I've searched/googled about this particular issue but didn't find anything about it. I also have tried the solution described in this other topic (https://processwire.com/talk/topic/1002-cant-upload-imagefiles-problem/) to try in solving the image issue at least, without any good result. I thought the problem was maybe connected to the file permissions on the local installation, but the same situation has verified on remote test installation. I'm using latest stable PW version on WAMP: Apache v2.4.9 PHP v5.5.12 MySQL v5.6.17 Any idea, friends? Thanks.
  22. I'm developing a site for a client which involves (non-logged in) users submitting resources which other anonymous users can then view or download. The final downloadable resources will be produced by my client from files and text (up to 10 files - pdfs, spreadsheets, images etc) uploaded by the user. So the flow goes something like this: User submits a frontend form containing a description of the resource, eg typical resource may be "Study of sustainability of commercial fishing in area X", along with a number of files, for example, shaded maps (image), spreadsheet of data, word or open document of evidence, and a number of other images. Files and text descriptions are emailed to my client Client reads through and organises the files and text into one or more PDFs. Client creates a new PW page, adds a description of resource, and uploads PDF(s) to the page Users then view the PW page and can download or view the accompanying PDFs Pretty simple kind of scenario. However, I'm conflicted as to how the upload/emailing of images should proceed; I could either: email the uploaded resources (up to 10 of) direct to the client, or use the API to create a PW page, add the uploaded resources to the page, save page, email resources from the page to the client, and then finally delete the page. Option 1 is simple, but there may be issues? - email failure would result in loss of the resources - large email (10 attachments of up to possibly 5Mb each) could be seen as spam? etc. Option 2 is a little more complex but allows resources to be maintained - in case of email failure resources could be downloaded manually I'm looking for suggestions here, which option would you choose to implement, or an alternative path altogether?
  23. Hi there I have been using soma's form-process.php to sort out uploading images and form details to create pages and it works great. However, I now want to extend it so that I can allow mixed allowed extensions like txt, csv as well as image files to be uploaded. (to allow designers etc to upload project files) - I don't however need to see the files or images, but just create a link in the created pages to let me download them from the created directory so that I can process/view them. Second part would be to get an email heads up (less of an issue), then do a drag and drop front end. Get there eventually. Any pointers or help that didn't need me to roll back too much would be great.
  24. Hi, today I installed a fresh copy of Processwire (2.4 dev) and now i wanted to upload some files and images on a page. when i select the files the ajax-upload works as expected (although there are no thumbnails). but after saving the page the input field is empty again and the files are gone from the page. in the filesystem the files are still existent. do you have any idea what could cause this problem? thanks! EDIT: when i turn on the console, I see the following error: POST http://localhost:8888/cms/page/edit/?id=1025 500 (Internal Server Error) InputfieldFile.js?v=107:252 uploadFile InputfieldFile.js?v=107:252 traverseFiles InputfieldFile.js?v=107:287 (anonymous function) InputfieldFile.js?v=107:297
  25. Hi together! After installation i tried to install a language pack, but after dragging the file into the field i got an error with the following message: "Error writing to /tmp. Please define $config->uploadTmpDir and ensure it is writable." I tried to edit the config.php in the dir site and add the following line: $config->uploadTmpDir = dirname(__FILE__) . '/tmp'; But that is also not a solution. Does anybody know a solution for this problem? I have the problem with every kind of uploading a file. I am happy about every answer. Regards, Bluemagicon
×
×
  • Create New...