php-sdk icon indicating copy to clipboard operation
php-sdk copied to clipboard

If using 'tmp_file' you will need to use move_uploaded_file() first

Open ethanwillis opened this issue 4 years ago • 4 comments

As stated in the title you will need to use move_uploaded_file() if you are handling uploads yourself and using tmp_file. This is because 'tmp_file' will remove the file extension which breaks parsing on the Transloadit side.

See the following resources:

  1. https://www.php.net/manual/en/function.move-uploaded-file.php#refsect1-function.move-uploaded-file-examples
  2. https://stackoverflow.com/questions/4693144/uploaded-picture-in-tmp-is-without-file-extension

We will need to update the documentation with a note about this just in case other people want to try and exert more control without using Transloadit::createAssemblyForm()

ethanwillis avatar Dec 14 '20 06:12 ethanwillis

Hi @ethanwillis could you give us more context about this? maybe a piece of code could help to understand better :)

eerison avatar Dec 18 '20 09:12 eerison

@ethanwillis if I understand correct you just need to pass the right path in array('/PATH/TO/FILE.jpg'), I guess, it doesn't matter if it's in tmp or other folder, if PHP can access this file and there is permission to handler it, it'll works ....

eerison avatar Feb 25 '21 12:02 eerison

I guess issues with more then 1 month without any interaction could be closed and if you see it's necessary the owner can open again

@kvz

eerison avatar May 20 '21 10:05 eerison

cc @ethanwillis

kvz avatar May 20 '21 12:05 kvz