Upload file content to dropbox - php

I want to upload file that I am generating in my app. It looks like I can upload file if I will provide path to the file, or url where the file is, but I have only content of the file. Is there a way I can upload that content dropbox ? I am using third party php sdk

I solved this by creating temporary file that will be uploaded and then deleted.

Related

On Submit directly upload attachment to google drive using PHPRunner

I am creating a simple form using PHPRunner in which the attached file should directly be saved to Google Drive.
What expression should I put in the Upload Folder section?
Also I do want to rename the file when it is being uploaded.
After the upload, I need the URL of the file so that I can hyperlink the file and onClick of the link the file should be editable.

dynamically give pdf path in pdf.js using php mysql

I've developed a small application in php and mysql, where i'm uploading pdf and moving file to UPLOADS folder and storing path in database.
But in viewing after passing path i'm not able to open pdf on browser.
I've uploaded PDF.JS files in my folder aswel.
Below are my testing urls.
http://www.farukhzama.com/fileupload/index.php
http://www.farukhzama.com/fileupload/view.php
Your link is :
http://www.farukhzama.com/fileupload/viewer.html?file=uploads/47920-ombudsman-acknowledgement.pdf at view.php file, which is wrong path to get the pdf file.
Give it right path like this => http://www.farukhzama.com/fileupload/uploads/47920-ombudsman-acknowledgement.pdf
Thanks!

Upload folder using Google Drive PHP API

I want to upload a folder of files to Google Drive, using the PHP API. I can upload a single file to my Google Drive, but can't seem to upload a folder of files...e.g. a folder containing some Word documents and PDFs. Does anyone know if this is possible?
Files: insert Insert A new file
In instances like this the documentation can be a big help. File.insert is for inserting A file as in one singular. If you want to insert more then one I suggest you look into using a loop and looping over each of the file you would like to upload.
Tip:
setting the mime type as follows creates the initial folder
mimeType = 'application/vnd.google-apps.folder'
Note the file id when that is created and set the parent of the files up upload to that and they will be uploaded into that directory.

How to delete a file after using move_uploaded_file()

Ok, I first uploaded a file using move_uploaded_file(). I then used Dropbox to grab that file and used Dropbox SDK to upload the file to my Dropbox account. I now don't need that file in my File Directory. I only need that file in my Dropbox account. How do I now delete this file with PHP?
My guess would be something like this: delete_file($movie_tmp, $movie_destination);
Thanks!
It's just unlink('page.html');

blueimp - PHP file upload drops file extension

I'm using blueimp/jquery-file-upload for file upload. My back-end language is PHP. While user uploaded their docs few files were uploaded without any extension. When i see my file upload tracker those document names are "blob". But it is not possible different users uploading files with same name. So it should be something handled inside bluimp source code. blueimp should change some type of file names to "blob" and those documents are uploaded without any extension in server. Does anyone have an idea about this?

Categories