powered by Jive Software

HttpFileUploadManager hard codes Content Type

We are using Smack in an Android application, including the use of HttpFileUploadManager.java for XEP-0363, which has worked pretty well.

We have the need to set the content type for the uploaded file, however HttpFileUploadManager.java hard codes the use of “application/octet-stream”

If this method were pulic I believe we could get by.

private void uploadFile(final File file, final Slot slot, UploadProgressListener listener) throws IOException

Or one better, would be to overload

public URL uploadFile(File file, String contentType, UploadProgressListener listener) throws InterruptedException,
XMPPException.XMPPErrorException, SmackException, IOException

Please let me know if we are overlooking anything and if the above would make sense.

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.