gildas-lormeau / SingleFile

Web Extension for saving a faithful copy of a complete web page in a single HTML file
GNU Affero General Public License v3.0
14.29k stars 943 forks source link

Feature/rest form api #1450

Closed yooper closed 1 month ago

yooper commented 1 month ago

Added Destination option for sending the page to an REST Form API endpoint.

gildas-lormeau commented 1 month ago

Thank you, it looks fine to me. Is the fact that compressed files are not supported (i.e. zip, self-extracting zip files) deliberate?

gildas-lormeau commented 1 month ago

I have another question. Why don't you pass directly blob to formData.append(), without creating a File instance in the rest-form-api module?

yooper commented 1 month ago

Thank you, it looks fine to me. Is the fact that compressed files are not supported (i.e. zip, self-extracting zip files) deliberate?

It was not deliberate. Just a lack of familiarity. I can follow up with a future PR to add the feature, after I dig into the code a little more.

yooper commented 1 month ago

I have another question. Why don't you pass directly blob to formData.append(), without creating a File instance in the rest-form-api module?

I used an approach from a previous implementation. I will try to implement using a blob directly and follow up with a future PR if it is successful.

Thank you for accepting this feature into the code base.

gildas-lormeau commented 1 month ago

I've just pushed the support of compressed files. Can you confirm it works fine for you? (I also removed the usage of File)

yooper commented 1 month ago

I've just pushed the support of compressed files. Can you confirm it works fine for you? (I also removed the usage of File)

Yes, I can test and get you feedback before EOD.

gildas-lormeau commented 1 month ago

Thank you!

yooper commented 1 month ago

@gildas-lormeau, I tested the following format options:

gildas-lormeau commented 1 month ago

Thank you for the feedback, that's the expected result :).