Archived from the Transloadit support forum. Originally posted on February 2, 2012; details may be outdated, see our docs for current behavior. Original thread
Hey Tranloadit,
I have been trying to setup the robot/sftp to download the converted files, but the ssh configurations are not working as planned for now. It is possible for me to go through all the [‘results’][‘url’] 's from the conversion response and use curl for example to download the resulting converted files via the tmp url?
I’ve tried this, but the issues I encounter is that the tmp url ends with a hash and not with a file extension. Secondly, in the case of photos the tmp url points to a file that does not seem to be the final resulting file, but more like a thumbnail of what the result is supposed to be.
If yes? are there any potential issues with this? scale, number of curls per minute etc? if no? is there another way to get the files that does not involve setting up a special linux group, user and home directory to receive the files from transloadit.
Thanks guys,
Ayuba Audu
Software Engineering
Florida Institute of Technology
I am not I understand why you want to download the files. After all that is what the sftp robot does for you … put the result files where you want them to be on your own server and then make them publicly available using the url_path setting.
My issue is that if I can’t get the robot/sftp to work in time, can I just pull down the files via the [‘transloadit’][‘results’][‘url’]'s and batch download them and switch to the robot/sftp once I have it working?
Sincerely,
Ayuba Audu
Software Engineering
Florida Institute of Technology
Perfect, lastly is the file extension of each result contained in the [‘transloadit’][‘results’] array? and if not do you have any suggestions about where to get the file extensions to save the wget’s as?
Sincerely,
Ayuba Audu
Software Engineering
Florida Institute of Technology
when you traverse through the $results array, each entry has a lot of information about the file. Please check that array … it should also have an “ext” key and a “mime” key.
I got the url’s direct download to work via wget. I’m now tying to wrap everything together with your PHP SDK in a nice class with no luck in a certain issue.
I made single file annouce.php that will upload the files using a TransloaditRequest object. Once I run the execute() on the object I thought that by accessing the returned TransloaditResponse->data I would have access to the $results array information in there. But all I get is the curl information. see code below
So my question? is there a way to use the PHP SDK without javascript and upload a file on my sever file system and load the $results on the same page?
`<?php
require_once($_SERVER[DOCUMENT_ROOT].'/dev/tmp/lib/Transloadit.php');
$redirect_url = sprintf(
'http://%s%s',
$_SERVER['HTTP_HOST'],
$_SERVER['REQUEST_URI']
);
$properties = (array(
'files' => array('0.png'),
'params' => array(
'steps' => array(
'resize' => array(
'robot' => '/image/resize',
'width' => 200,
'height' => 100,
)
),
'redirect_url' => $redirect_url
)
));
$t = new TransloaditRequest($properties);
$tr = $t->execute();
if ($tr) {
//we are in the redirect_url block || we are in the notify_url
if (!$tr->error()) {
echo "<pre>";
print_r($tr->data);
echo "</pre>";
} else {
echo "something went wrong with the request that was sent";
}
} else {
echo "transloadit response failure";
}
I got the url’s direct download to work via wget. I’m now tying to wrap everything together with your PHP SDK in a nice class with no luck in a certain issue.
I made single file `annouce.php` that will upload the files using a `TransloaditRequest` object. Once I run the `execute()` on the object I thought that by accessing the returned `TransloaditResponse->data` I would have access to the `$results` array information in there. But all I get is the `curl` information. **see code below**
So my question? is there a way to use the PHP SDK without javascript and upload a file on my sever file system and load the $results on the same page?
I’ve tried using the sftp store, but it takes too long for me to get a response back. When I used the sftp store robot the assembly keeps executing infinitely and I never get an “ASSEMBLY_COMPLETED” could you look into this? I’m considering switching to the notify_url if that can respond to me much faster.
Here are the assemblies I’m still waiting on, these same requests without the sftp store took less than 5 seconds.