Jump to content

Interferon

Clients
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    4

Community Answers

  1. Interferon's post in Next Step: Bulk add externally hosted files in the Downloads system was marked as the answer   
    I found a service provider here who is able to complete this task, so it's basically solved:
    https://invisioncommunity.com/third-party/providers-directory/
  2. Interferon's post in Bulk upload many files/items? was marked as the answer   
    I was able to determine the answer to this.
    As far as I can tell, the web API will not work with desktop applications except under extremely limited circumstances, at least on my server.
    However, I was able to easily add files via a PHP script on our server using an API key, instead of the OAUTH desktop application.
  3. Interferon's post in Uploading a binary file with the REST API was marked as the answer   
    I found that it works if you read the binary file data into a string and then do a url-encode operation. This is strange to me because I never associated that with binary data before, but it works.
    Also, make sure your php.ini file allows file sizes as big as you are trying to upload, and gives the uploader enough time to finish. For a max file size of 1 GB and 10 minutes upload time, the settings would be like this, I think:
    upload_max_filesize = 1024M post_max_size = 1024M memory_limit = 1024M max_input_time = 600 max_execution_time = 600 You must restart your server after making changes to PHP settings.
    If your upload fails you will not receive any meaningful error codes. In my case it just says "no categeory" (sic), probably because the data is getting prematurely terminated and the remaining fragment isn't parsed correctly. Perhaps the REST API should accept an optional filesize[] parameter so that an error message can be displayed if the received file data does not match the expected value?
    It's best to test with very small files to begin with, and then scale up and debug as you hit problems uploading bigger files, and just try uploading files without screenshots to start with.
  4. Interferon's post in Upload file through REST API was marked as the answer   
    Damn, I figured it out thanks to this post:
    Files is NOT an array, it is an OBJECT, and the file name and contents are key-value pairs on this OBJECT.
    options += "files[MyFile.zip]=Hello!";  
  5. Interferon's post in Trying to upload a file via the web API was marked as the answer   
    I figured it out, I was confusing the scope and the end point in the user authentication.
×
×
  • Create New...