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. Hey guys, I am just new here and I am trying to understand how to use this tool. The app: more or less a copy of wetransfer Who's building it ? Me. as a learning project, I want to build a local file transfer app. What I want it to do? : notifications via email Single / Multiple files upload ( a maximum of 4 gb per file / or maximum of 4gb of multiple files ) How should I think the structure of this app? How would upload system work ? Please provide links and tags. Cheers
  2. Hi everyone, I'm working on a project where users can upload images, using a jquery uploader (no $_FILES input in the form) : - User select images - Images are uploaded in a specific folder After that, how can i attach the images to a page ? I took a look to wireupload() but it seems to need a $_FILES input. Thanks for you help
  3. Hi ! I trying to send a "Participant form" that should be a bit dynamic. Very simplified the form looks like this Club info Participant NAME etc [ + add one more ] Photo of receipt [submit] My problem is how to use wireupload with data sent by JavaScript. I get as far as the upload path... but at $u = new WireUpload(XXX); I'm totally in the dark which info the xxx should bee when sent as JavaScript. ? My goal is to populate the field $item->f_receipt with the photo. (Right now im working locally... hope that don't cause problem) var_dump($_FILES); looks like this so im sending something to my process page: array(1) { ["f_receipt"]=> array(5) { ["name"]=> string(22) "121010-111847AM_m7.jpg" ["type"]=> string(10) "image/jpeg" ["tmp_name"]=> string(36) "/Applications/MAMP/tmp/php/phppJGcSh" ["error"]=> int(0) ["size"]=> int(50846) }} I have been reading around at the forum for two nights but im to novice to get it. Copying code from http://processwire.com/talk/topic/1809-image-upload-via-wireupload/ http://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/page-3 this is my code: All tips in the right direction will very welcome. function addPage($ordernumber, $name, $enamn, $gender, $weight, $cardnumber, $club, $trainer, $epost, $telefon, $message, $receipt,$_parent ){ $item = new Page(); // create new page object $item -> template = 'competition_form_person'; // set template $item -> parent = $_parent; $p -> name = uniqid($name . '_' . $enamn); $item -> title = $_REQUEST['f_ordernumber'] .'_' . $name . '_' . $enamn . '_' . $weight; $item -> save(); $item -> f_ordernumber = $ordernumber; $item -> f_name = $name; $item -> f_ename = $enamn; $item -> f_gender = $gender; $item -> f_weight = $weight; $item -> f_kampsportskort = $cardnumber; $item -> f_club = $club; $item -> f_trainer = $trainer; $item -> f_epost = $epost; $item -> f_telefon = $telefon; $item -> f_message = $message; $item -> save(); $upload_path = $page->config->paths->root . 'tmp_uploads/'; echo '$upload_path---------------------------->' . $upload_path; // RC: create temp path if it isn't there already if(!is_dir($upload_path)) { if(!wireMkdir($upload_path)) throw new WireException("No upload path"); } if(empty($_FILES[$req]['name'][0])){ $errors[$req] = "Select files to upload."; } // setup new wire upload $u = new WireUpload($receipt);/// $receipt['name'] $_FILES $u->setMaxFiles(1); $u->setOverwrite(false); $u->setDestinationPath($upload_path); $u->setValidExtensions(array('jpg', 'jpeg', 'png', 'gif')); foreach($u->execute() as $filename) $item->f_receipt -> add($filename); $item -> save(); } The JS sending info oData = new FormData(document.forms.namedItem("form_competition")); var receipt = document.getElementById('f_receipt'); var file = receipt.files[0]; oData.append('f_ordernumber', postJSON.f_ordernumber); oData.append('f_trainer', postJSON.f_trainer); oData.append('f_epost', postJSON.f_epost); oData.append('f_telefon', postJSON.f_telefon); oData.append('f_receipt', file); oData.append('f_message', postJSON.f_message); oData.append('fighters', JSON.stringify(postJSON.fighters)); /*make the ajax call*/ $.ajax({ url: "/slagskeppet_test/ProcessWire-master/call_competition_form/", type: "POST", data: oData, contentType: false, processData: false, success: function(msg){ alert(msg); }, error: function() { alert("failure"); } }); /Erik
  4. Hi, sometimes, when I try to upload an image, the thumbnail (and the image itself) appears with the wrong orientation (I have a vertical image but I get a horizontal one..) is there a quick fix? UPDATE: I notice this happens only with images I took with my smartphone. Using a "regular" camera (nikon D5000) works like a charm!
  5. Hello. I have been playing around with PW for a while now (former WP user). In issue that I have encountered is that when uploading images / photos. The original image is keeping the correct orientation, but the images that are being generated on the fly by PW are all ending up with lanscape orientation. Example: I have a picture with: width: 480px height: 720px Then upon resize the ratio is changed to example: width: 200px height: 133px I have both tried the build in image module and the thumbnails module with the same results. Any ideas / suggestions ? Thanks / Ronnie
  6. what I need to do is add <a href="javascript:pixlr.overlay.show({image:'path/to/image.jpg', title:'image name'});"><img src="path/to/image.jpg" width="250" height="150" title="Edit in pixlr" /></a> around any images that are uploaded. So when you have an image in the admin side it can be edited via pixlr. I have successfully loaded the required scripts that this requires but need to know where to add the href wrapper (see above) if I can call it that.
  7. Hello all, today I've got a problem with a form submission, specifically with images uploads. Before strarting this thread I've read and followed this topics: http://processwire.com/talk/topic/126-anybody-did-user-registrationlogin/ http://processwire.com/talk/topic/3105-adding-file-upload-field-to-form-via-api/ And here is my code: https://gist.github.com/anonymous/5517109 The form subscription worked correctly until I've integrated the WireUpload function, that seems to cause me some problems...infact if i comment out this count() check in the code... if(!count($files)) { $u->error("Sorry, but you need to add a photo!"); return false; } ... the form data get recieved (everything but the images..) and the newpage created. So it seems that the image upload never runs. I also tried to override PHP's upload_temp_dir with $config->uploadTmpDir = dirname(__FILE__) . '/assets/uploads/'; in site/config.php and use that folder as my temporary one, but no luck there too... I want to notice that my console didn't recieve any errors when I submit the form, everything seems to work but it's not I'm on a local server (Wamp on Windows) and in my php.ini file file uploads and temporary directory are set like this: ; Whether to allow HTTP file uploads. ; http://php.net/file-uploads file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). ; http://php.net/upload-tmp-dir upload_tmp_dir = "c:/wamp/tmp" Any advices from you guys? Thanks.
  8. I used the new module profile exporter. I love the idea! I followed the instructions correctly and detailed. I used processwire 2.1 to design and link the front end with the back end. All this was done with MAMP, it worked perfectly. So once I put it in the hosting I had to install processwire 2.2 as the instructions say. After this I just viewed it online and some things did not work visually. Some mistakes may be because of the hosting server, and other issues I dont know, and thats why I ask as maybe somebody had the same issue. These are some problems: 1. Random background image "home": I have a random image which is covering the whole home background. I'm using a javascript which selects an image from an array randomly. These images have the url assigned correctly as it works in my MAMP server with processwire. I do not know why this javascript wouldnt work. 2. PHP form: I have a php form which has its own url also. It gave me problems as I discovered it only works if its out of the folder of templates. Now it just does not work... 3. Extremely slow: I dont know if this is processwire, but maybe you can help me to know what could I do to solve this. 4. Shockwave crashes: I use soundcloud for the songs which are uploaded. So the widget is created with flash. I dont understand why it would crash, it only crashes when its online and not in the MAMP server. If you need to see the source and it helps this is the website at this moment: http://www.fem-k.com/ Thank you very much everybody, without you this wouldn't be possible! Dani
  9. 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
  10. Hope anyone can help me out, searched the forum for similar problems but.... Uploading an image results in an error (unable to move the uploaded file .... ), safe_mode is off, upload_tmp_dir is set in the php.ini If I open up the related folder the files are uploaded and in de page folder, but have only read/write access for the user (rw-------). Anyone?
  11. I have a problem with uploading files (not images) to a file upload with ajax. Everything below ~6mb works well, after that it doesn't complete upload. The upload max filesize and post max size is ~30mb. BUt on another hosting I have a PW that have 8mb+ files. So is there any other setting on the server that could limit this? I get this on the response header: HTTP/1.0 500 Internal Server Error Date: Wed, 05 Sep 2012 12:50:10 GMT Server: Apache/2 X-Powered-By: PHP/5.2.4-2ubuntu5.25 Content-Length: 0 Connection: close Content-Type: text/html
  12. Hello together, is there any known bug with Safari (on Mac) and the HTML5 image uploading? Somehow the "drag'n'drop" feature does not work properly - The "drag and drop files in here" text does not appear at the bottom - So I guess it's switched off completely? No problems with firefox and chrome by the way Oh and thanks a lot for this really great CMS! I recently launched sn4ke.de
  13. I am trying to use the Admin i/f to upload a .PDF (or .DOC) and it seems I can as long as the file is 128KB or less. I have edited php.ini for a website and now phpinfo(); reports: post_max_size = 32M upload_max_filesize = 24M max_execution_time = 60 max_input_time = 60 memory_limit = 128M I tried uploading files of gradually decreasing size and it worked for one that was 127KB but failed for one that was 132KB (and for all those larger) — the upload bar moves as expected to 100% but then does not prompt for a file description and when saving the page the file is no longer seen. I am running PW 2.2.2.1. Any ideas anyone pretty please?
  14. Hi all, I've been developing a small site using PW 2.2 on my dev account at phpfog and things have been going pretty smooth. So comes the time to move the site to production (running PHP 5.2.17, safe_mode off, PW debug set to true) and I've been unable to upload new images ever since. The site/assets folder is writable (also set permissions of all folder in it to 777 just in case). When I create a new page and try to upload a new image, the upload process doesn't start (nothing happens) but the file size is shown and the page's folder is created under assets/files. Upon inspection using Firebug's console I get a 403 Forbidden for the Ajax uploader's POST response: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access /beta/processwire/page/edit/ on this server.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> </body></html> Checking phpinfo I found that that the upload_tmp_dir variable is not set (no value) so I tried overriding it in config.php as outlined in this thread. Still no luck. I dumped the site to my computer and upload works fine. Anybody have an idea what I'm doing wrong? Thanks!
  15. Hi, have had some problems uploading my sites created in windows and uploading them to a Linux server, the rights of the files are allways wrong. Is there an easy way to fix this?
  16. Hi all! I was wondering if it's possible to set up custom destination directories for different templates and/or fields. The example would be the following: I have a custom field named 'pdfs' and everything it uploads goes to /assets/pdfs. And so on? You know what I mean? So the file url would be cleaner and meaningful. This way I would have some url organization for files, like: assets/brochures, or assets/pdfs. Thanks in advance!
×
×
  • Create New...