Skip to content
Discussion options

You must be logged in to vote

so this is more a JS question than Uploady, but here's the way:

You actually need to create a new File object -

 const f = items[0].file;

      items[0].file = new File(
        [f],
        "my new file name",
        { type: f.type, lastModified: f.lastModified }
      );

I'd still recommend doing this on the server rather than on the client

Replies: 5 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@savasgok
Comment options

Comment options

You must be logged in to vote
1 reply
@yoavniran
Comment options

Comment options

You must be logged in to vote
1 reply
@yoavniran
Comment options

Comment options

You must be logged in to vote
1 reply
@yoavniran
Comment options

Comment options

You must be logged in to vote
2 replies
@yoavniran
Comment options

Answer selected by savasgok
@savasgok
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants