Alongside the file object in your post, pass the name of the file as
parameter. You can extract the file name from the file object.
In Python, have a look at the snippet below.

requests.post(url,
                 files={file_name: file_object},
                 params={'name': file_name},
                 headers={'Content-Type': 'multipart/form-data'},
                cookies={"JSESSIONID": ""})


*Kind Regards, *
*Phanuel Ayuka.*
*Systems Developer - **Android | Django | Java EE | ODK Aggregate | PHP*


On Fri, Jan 24, 2020 at 4:32 PM Ponniah MANIKANDAN D <
[email protected]> wrote:

>  When I try to upload a file to bistream using API, I did POST from
> postman adding the file under body. The file  is successfully uploaded, but
> the name is null.
>
> --
> All messages to this mailing list should adhere to the DuraSpace Code of
> Conduct: https://duraspace.org/about/policies/code-of-conduct/
> ---
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dspace-tech/7cf4daea-5389-4863-87c0-cfa9faf06753%40googlegroups.com
> <https://groups.google.com/d/msgid/dspace-tech/7cf4daea-5389-4863-87c0-cfa9faf06753%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/CAOSLvwyW%3D3_E07cMHgo0wfn3KzBSDvL61LwrsffOi4wb6S_feQ%40mail.gmail.com.

Reply via email to