Hi Rob, On 9/7/21 7:02 AM, Rob Landry wrote:
OK, so now I'm trying to figure out how to use IMPORT (command = 2). Do I read correctly in web_api.pdf that the field FILENAME is supposed to contain the contents, and not the name, of the file to be uploaded? Unfortunately, the error message I'm getting is "Your browser sent a request that this server could not understand", which has to be the most unhelpful error message I've seen since the DEC PDP-8's "WHAT?".
I struggled with this for a while too. Here's what I learned.The FILENAME field does indeed get the name of the file you are uploading; FILENAME should not included directory separator characters (e.g., "/"). The important piece is that you need to POST the request to the server using a multipart form. I set the following headers in my POST request:
Content-Disposition: form-data; name="FILENAME"; filename="file.mp3"
Content-Type: audio/mpeg
You need to make sure that whatever library you're using to create the
request also creates the multipart form (or create it manually). The
example in the web test code shows how to do an IMPORT:
https://github.com/ElvishArtisan/rivendell/blob/master/web/tests/import.html
Hope this helps! ~David
Rob -- Не думай что всё пропели, Что бури все отгремели; Готовься к великой цели, А слава тебя найдёт. _______________________________________________ Rivendell-dev mailing list [email protected] http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Rivendell-dev mailing list [email protected] http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
