Coder Social home page Coder Social logo

Comments (5)

josiasmontag avatar josiasmontag commented on July 28, 2024

No error thrown? Most likely the file is saved in the current working/temp directory. Try to set the wanted output path:
->download("/path/to/output.emf");

from cloudconvert-php.

stekla79 avatar stekla79 commented on July 28, 2024

Thanks for the quick reply!
No error is thrown with the code above.

If I try to set the path with the following code
->download('/data/baagede/output.emf');

This error is thrown:
Warning: fopen(/data/baagede/output.emf): failed to open stream: No such file or directory in phar:///storage/content/51/132251/fiskdata.se/public_html/_inc/cloudconvert/cloudconvert-php.phar/src/Process.php on line 135 Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Invalid resource type: boolean' in phar:///storage/content/51/132251/fiskdata.se/public_html/_inc/cloudconvert/cloudconvert-php.phar/vendor/guzzlehttp/psr7/src/functions.php:113 Stack trace: #0 phar:///storage/content/51/132251/fiskdata.se/public_html/_inc/cloudconvert/cloudconvert-php.phar/src/Process.php(157): GuzzleHttp\Psr7\stream_for(false) #1 phar:///storage/content/51/132251/fiskdata.se/public_html/_inc/cloudconvert/cloudconvert-php.phar/src/Process.php(135): CloudConvert\Process->downloadStream(false, NULL) #2 /storage/content/51/132251/fiskdata.se/public_html/adm/report/ajax/convertSVG-EMF.php(53): CloudConvert\Process->download('/data/baagede/o...') #3 {main} thrown in phar:///storage/content/51/132251/fiskdata.se/public_html/_inc/cloudconvert/cloudconvert-php.phar/vendor/guzzlehttp/psr7/src/functions.php on line 113

from cloudconvert-php.

josiasmontag avatar josiasmontag commented on July 28, 2024

Please make sure the directory exists and is writeable.

from cloudconvert-php.

stekla79 avatar stekla79 commented on July 28, 2024

Should it be an absolute or relative path? I will set the path dynamically depending on the source

$_SERVER['DOCUMENT_ROOT'] . '/path-to-folder/filename.ext'
'/path-to-folder/filename.ext'

EDIT:
If I use the absolute path I can save the output on the local server, but still the download doesn't start.

I'm using Chrome.

from cloudconvert-php.

josiasmontag avatar josiasmontag commented on July 28, 2024

$process->download() saves the output file locally on your server. If you want to serve the output file to your users, this is thing of your implementation. Alternatively you can point your users directly to $process->output->url.

from cloudconvert-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.