ModdingFox / OpenFuraffinityClient

A toy project of mine to build an unofficial furaffinity client for android
11 stars 1 forks source link

Fix broken upload #115

Closed ModdingFox closed 3 years ago

ModdingFox commented 3 years ago

FA did some updates to their upload process. Just caught this when playing round in the app. Need to make uploading things work again ^.^

If I recall the old way was a 4 part.

  1. Get initial page to load options on GET "/submit"
  2. Set submission type on A FORM POST "/submit"
  3. Upload content/thumbnail on A FORM POST "/submit". Success redirect will move us to a page that has a valid option list for step 4
  4. Finalize content on A FORM POST "/submit"

New way appears to be a 3 part that combines parts 2 and 3

  1. Get initial page to load options on GET "/submit"
  2. Set submission type and Upload content/thumbnail on a FORM POST "/submit/upload". Success redirect will move us to a page that has a valid option list for step 3
  3. Finalize submission details URL encoded data POST "/submit/finalize"

Step 2 example payloads: -----------------------------123456789 Content-Disposition: form-data; name="MAX_FILE_SIZE"

10485760 -----------------------------123456789 Content-Disposition: form-data; name="key"

0123456789abcdef0123456789abcdef01234567 -----------------------------123456789 Content-Disposition: form-data; name="submission_type"

submission -----------------------------123456789 Content-Disposition: form-data; name="submission"; filename="unixEpochInSeconds.insertUserNameHere_fileName_noCule.jpg" Content-Type: image/jpeg

fileDataGoHere^.^ -----------------------------123456789 Content-Disposition: form-data; name="thumbnail"; filename="unixEpochInSeconds.insertUserNameHere_fileName_noCule.jpg" Content-Type: image/jpeg

fileDataGoHere^.^ -----------------------------123456789--

Valid Values: MAX_FILE_SIZE: 10485760 submission_type: submission, story, poetry, music

Step 3 example payloads: key=0123456789abcdef0123456789abcdef01234567&cat=1&atype=1&species=1&gender=0&rating=0&title=test&message=subDesc&keywords=keyword%2C+otherkeyword%2C+hehe&lock_comments=1&scrap=1&create_folder_name=

ModdingFox commented 3 years ago

Moved some stuff around for the most part seems to be fixed now