Search code examples
bashcurl

cURL cannot read local data from existing file/application


ALBUM_NAME="At The Soundless Dawn"
SONG_FILE_NAME="01. Alone And Unaware The Landscape Was Transformed"
ALBUM_FOLDER_NAME="/Users/canercetin/Git/audio-splitter/Red Sparowes/2005 - At The Soundless Dawn [Daymare Rec., PTCD-1020]"
COVER="$ALBUM_FOLDER_NAME/Front.jpg"
INSTRUMENTAL_FILE="$ALBUM_FOLDER_NAME/${SONG_FILE_NAME}.mp3"
EXIF_INFO="$ALBUM_FOLDER_NAME/${SONG_FILE_NAME}_info.json"
curl -v \
    -F "cover=@$COVER" \
    -F "name=$ALBUM_NAME" \
    -F "instrumental=@$INSTRUMENTAL_FILE" \
    -F "exifInfo=@$EXIF_INFO" \
    -X POST \
    "$UPLOAD_HTTP_SERVER/admin/albums/upload"
curl: (26) Failed to open/read local data from file/application

this curl command is eating away the last bit of my already crumbling sanity

(split) audio-splitter ➤ du $INSTRUMENTAL_FILE                                                                                                                                    
39776   /Users/canercetin/Git/audio-splitter/Red Sparowes/2005 - At The Soundless Dawn [Daymare Rec., PTCD-1020]/01. Alone And Unaware The Landscape Was Transformed.mp3

you exist. and i can play you. enter image description here

(split) audio-splitter ➤ du $COVER                                                                                                                                                
48      /Users/canercetin/Git/audio-splitter/Red Sparowes/2005 - At The Soundless Dawn [Daymare Rec., PTCD-1020]/Front.jpg

you exist. and i can see you. enter image description here

(split) audio-splitter ➤ du $EXIF_INFO                                                                                                                                            
8       /Users/canercetin/Git/audio-splitter/Red Sparowes/2005 - At The Soundless Dawn [Daymare Rec., PTCD-1020]/01. Alone And Unaware The Landscape Was Transformed_info.json

you exist. and i can read you. enter image description here then what is wrong with you??????

curl: (26) Failed to open/read local data from file/application

speak to me, what is wrong with you curl? why are you rejecting me? you and I, we are family. we have been living together in this house for so long. why? why you are so in love with death? why cURL? why are you hating me? did i fail you? was i never the correct boyfriend for you? why? why are you doing this with me?


Solution

  • There is a comma in the path. Check this thread (response from Luis Cruz): curl: (26) couldn't open file