upload

Upload website + database to dropbox with PHP

烈酒焚心 提交于 2019-12-03 21:17:51
Does anyone know, if it's possible to backup my website and database to a dropbox account with php or something? And if it's possible, how can I do it the best way? :-) Best Regards Simon Yes it is, have a look at the dropbox-php . Example Code from the documentation: /* Please supply your own consumer key and consumer secret */ $consumerKey = ''; $consumerSecret = ''; include 'Dropbox/autoload.php'; session_start(); $oauth = new Dropbox_OAuth_PHP($consumerKey, $consumerSecret); // If the PHP OAuth extension is not available, you can try // PEAR's HTTP_OAUTH instead. // $oauth = new Dropbox

Implementing jquery upload plugin 'uploadify' with codeigniter

我的未来我决定 提交于 2019-12-03 21:06:05
How can i implement this in codeigniter? Uploadify(Jquery) I mean what will be the controller? Hows the progress tracked? And what will happen if flashplayer is not installed by the user? And How do i check progess? Have any one tried this with codeigniter? I have successfully implemented uploadify in codeigniter as follows: In the header view : <script type="text/javascript" src="<?php echo base_url()?>resources/js/jquery.js"></script> <link rel="stylesheet" type="text/css" media="all" href="<?php echo base_url()?>resources/uploadify/uploadify.css" /> <script type="text/javascript" src="<?php

PHP sending mail attachments

白昼怎懂夜的黑 提交于 2019-12-03 20:49:19
I found the post about adding attachments to the mail. The question is how to connect uploaded file with that function? What I have to pass? UPD: echo '<pre>'; print_r($_FILES); echo '</pre>'; $uploads_dir = '/uploads'; // It has need rights $tmp_name = $_FILES["vac_file"]["tmp_name"]; $res = is_uploaded_file($tmp_name); // This is true $name = $_FILES["vac_file"]["name"]; move_uploaded_file($tmp_name, "$uploads_dir/$name"); echo '$tmp_name: '. $tmp_name . '; $name: ' . $name; → Array ( [vac_file] => Array ( [name] => LFS.desktop [type] => application/octet-stream [tmp_name] => /tmp/phpV417nF

How to show progress while upload file to Cloudinary in Android?

怎甘沉沦 提交于 2019-12-03 20:33:16
I implemented the uploading function the file to Cloudinary. Cloudinary cloudinary = new Cloudinary(Constants.CLOUDINARY_URL); try { FileInputStream is = new FileInputStream(new File(filePath)); Uploader uploader = cloudinary.uploader(); Map map = uploader.upload(is, new HashMap()); return map; } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } Now I would like to show the uploading percent in progress bar while upload. But I can't find any callback function to get uploading percent. Please help me. Thanks. cprakashagr answer actually

Multiple file input type upload in grails

自古美人都是妖i 提交于 2019-12-03 20:13:02
When I use the 'multiple' attribute I can't get it to work: <input type="file" id="files" name="files[]" multiple /> The controller action method body: request.getFileNames().each { println it } The problem is that this iteration returns only one file. Can anyone help me to obtain all the files uploaded? (I'm using grails 2.0.3) you have to get at the multiple file part of the request. I think you can do request.getMultiFileMap() or request.multiFileMap.documentFile Grails 2 uses Spring 3 which uses the MultipartRequest class to handle this. This class has a getFiles(String name) function

CodeIgniter - Uploading an Image through a form, store the location of the image in database

左心房为你撑大大i 提交于 2019-12-03 19:42:32
问题 I'm trying to upload an image to my site through a form, however it's much more efficient to (rather than bog down the database) just store the location of the image in the database. I'm having trouble with my form and really don't know where to go: <?=form_open('bro/submit_new');?> //other form data Image: <input type="file" name="image" size="20" /> <br> <input type="submit" value="Submit" /> </form> Now the form itself works fine, the problem is that it's trying to store the image into the

mkdir() says theres no such directory and fails?

坚强是说给别人听的谎言 提交于 2019-12-03 18:00:10
问题 Im likely doing something very simply wrong, but when I try to make a directory (using a variable of an insert just performed as the last folder name), I get the error: Warning: mkdir() [function.mkdir]: No such file or directory in /home/blah/blah with the code: if (!is_dir("images/listing-images/rent/'.$insertID.")) { //make new directory with unique id mkdir("images/listing-images/rent/'.$insertID."); } of course the directory doesn't exist.. I'm trying to make it now? confused! 回答1: You

How to rate-limit upload from docker container?

眉间皱痕 提交于 2019-12-03 17:26:33
问题 I need to prevent a long-running multiterabyte upload from eating all of my network's bandwidth, but I can only constrain its bandwidth usage on a process level (meaning that slowing down the whole machine's network interface or slowing down this user's network traffic won't work). Fortunately, the upload is containerized with Docker. What can I do to slow down the docker container's outbound traffic? 回答1: Thanks to this question I realized that you can run tc qdisc add dev eth0 root tbf rate

Resume HTTP Post/upload with Indy

拜拜、爱过 提交于 2019-12-03 17:11:08
I'm trying to resume an upload using indy (HTTP Post), the code looks like this (using Delphi 2010, Indy 10.4736): IdHttp.Head('http://localhost/_tests/resume/large-file.bin'); ByteRange := IdHttp.Response.ContentLength + 1; // Attach the file to post/upload Stream := TIdMultipartFormDataStream.Create; with Stream.AddFile('upload_file', 'D:\large-file.bin', 'application/octet-stream') do begin HeaderCharset := 'utf-8'; HeaderEncoding := '8'; end; // with with IdHTTP do begin IOHandler.LargeStream := True; with Request do begin ContentRangeStart := ByteRange; ContentRangeEnd := (Stream.Size -

Compressing huge files (> 2GB) into ZIP on the client side

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 17:09:35
问题 Im building an upload tool using node.js and socket.io , because they usually upload incredibly huge files and normal upload forms wouldnt work. The problem is that they wanted to compress the files into a zip before sending them, to increase efficiency in transmission. I've been researching around compression methods like JSZip or zip.js, but neither of those work well with extremely big files. What could I do? 回答1: You can compress up to 4GB of data with zip.js but: it will work only with