Skip to main content
Participant
October 2, 2023

Dropbox temporary url not working for me

  • October 2, 2023
  • 1 reply
  • 355 views

Hi,

I've been attempting to utilize the Photoshop API to execute certain actions but have encountered an obstacle related to storing the output.

My intention is to use Dropbox for storing my outputs. However, I am encountering challenges when trying to run the actions.

I have experimented with Photoshop actions files and actionJson, but unfortunately, I've encountered the same issue with both methods.

Here is my request

 

array:2 [ 
  "headers" =>  [
    "Authorization" => "my_auth"
    "x-api-key" => "my_key"
  ]
  "json" => [
    "inputs" => [
      0 => [
        "storage" => "external"
        "href" => "https://this_is_my_image_file_and_it_is_reachable.jpg"
      ]
    ]
    "options" => [
      "actionJSON" => // My actions
    ]
    "outputs" => [
      0 => [
        "storage" => "external"
        "href" => "https://content.dropboxapi.com/apitul/1/my_dropbox_temp_link"
        "type" => "image/jpeg"
        "embedColorProfile" => true
        "quality" => 10
        // I tried with overwrite true/false as well
      ]
    ]
  ]
]

 

 

Here is my error message

 

[jobId] => my_job_id

    [outputs] => Array
        (
            [0] => Array
                (
                    [input] => 'https://this_is_my_image_file_and_it_is_reachable.jpg'
                    [status] => failed
                    [created] => 2023-10-02T16:57:54.843Z
                    [modified] => 2023-10-02T16:57:56.424Z
                    [errors] => Array
                        (
                            [code] => 404
                            [title] => Internal Service Error
                            [type] => InternalServiceError
                        )

                )

        )

    [_links] => Array
        (
            [self] => Array
                (
                    [href] => https://image.adobe.io/pie/psdService/status/76c70e3e-acc7-4801-bc2c-ad8d3937ed21
                )

        )

 

 
I integrated Dropbox in my application and are successfully creating temporary upload links.
However, when I try the examples provided here in order to test the temporary upload urls, it is not working. It is giving a 404, same error code I get when trying to run actions.

Request

 

curl -X POST https://content.dropboxapi.com/apitul/1/my_temp_id -d test.jpg

 


Response
404 - Not found

This is because 

1) Dropbox expects a POST request, not a PUT request
2) Dropbox expects the content type to be application/octet-stream

Does the Photoshop API no longer support Dropbox? I've looked through older threads here and it appears that others have successfully used Dropbox in the past. 

It would be greatly appreciated if I could receive some guidance on how to move forward in this situation.

1 reply

Participant
October 2, 2023

Naturally, I discovered the solution immediately after posting this... Apologies for any confusion. The fix involved changing "storage" => "external" to "storage" => "dropbox".

With this modification, everything appears to be functioning as expected.

Array
(
    [jobId] => my_job_id
    [outputs] => Array
        (
            [0] => Array
                (
                    [input] => https://my_image.jpg
                    [status] => succeeded
                    [created] => 2023-10-02T17:34:44.035Z
                    [modified] => 2023-10-02T17:34:47.388Z
                    [_links] => Array
                        (
                            [renditions] => Array
                                (
                                    [0] => Array
                                        (
                                            [href] => https://content.dropboxapi.com/apitul/1/my_temp_link
                                            [storage] => dropbox
                                            [type] => image/jpeg
                                            [quality] => 10
                                        )

                                )

                        )

                )

        )

    [_links] => Array
        (
            [self] => Array
                (
                    [href] => https://image.adobe.io/pie/psdService/status/my_job_id
                )

        )

)