flowjs / flow.js

A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.
Other
2.96k stars 346 forks source link

Client and Server only works on same host. #384

Closed mitmelon closed 1 year ago

mitmelon commented 1 year ago

I have the flowjs client on localhost and then hosted the ng-flow server on cloud. Sending the file to the target of the server... Keep getting this error

sha1(): Passing null to parameter #1 ($string) of type string is deprecated"

But when I placed the server and client on same host, it works... but on different host it doesnt work and have added headers such as

header('Content-Type: application/json; charset=UTF-8');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Max-Age: 3600');

For CORS but yet its not working.

On client i have

var flow = new Flow({
  target:'https://my-server-link/upload', 
  query:{upload_token:'my_token'},
chunkSize: 1024*1024,
});

Please what is the workable method to use this?