On Submit directly upload attachment to google drive using PHPRunner - php

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.

Related

how can i restrict a file being viewed or downloaded using url? i want same file to be downloaded using php script

I want to restrict a pdf file on my server from being viewed or downloaded. for example, when somebody types below url in browser and press enter.
http://example.com/pdf/sample-pdf1.pdf
the file should not be viewed or downloaded. instead, it should get redirected somewhere else or should display some error message
But, when i download the same file using php or html code, it should get downloaded
for example when i use below code in a php file, it should get downloaded.
[a href="http://example.com/pdf/sample-pdf1.pdf" download]Download[/a]
Insert .htaccess file inside pdf directory with content:
"Deny from all" -
That will not allow access that directory and files inside it via URL.

Upload file content to dropbox

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.

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 upload a pdf file to any information page in opencart2?

I need to find a way to upload a pdf file to my terms & services page in opencart2. I've looked for an extention, but the suitable extentsion are for opencart 1.5.x.
Is there a way to upload a pdf file and make it downloadable on the information page?
The easiest way would be to upload the file using FTP to a location within your website (e.g. the downloads subdirectory), then put a link to it on the information page using the information page editor. (e.g. http://www.tuinenmetgevoel.nl/downloads/myfile.pdf)

How to create View and Download Links for files on Amazon S3

I am developing an App which uploads files i.e. images,pdfs,text documents to Amazon S3. I am able to upload the files using S3.php class.
I have to store two links to the file in the database , the first link is the link to view the file in the browser if it is an image or a pdf document. The second link is to download the file.
I am able to generate the URL for each of the file using :
$url = $s3->getAuthenticatedUrl($bucket,$uri,$expiry)
But clicking the URL starts downloading the file, also this URL has an expiry time. But I have to store the links in database for longer time.
I also have to display the images and pdfs inside the browser, How can I generate the links. Kindly help...

Categories