@Override
    public DescriptiveUrl toUploadUrl(final Path file, final Sharee sharee, final Void options, final PasswordCallback callback) throws BackgroundException {
        try {
            final Host bookmark = session.getHost();
            final CreateFileShareRequest request = new CreateFileShareRequest()
                    .fileId(fileid.getFileId(file))
                    .allowUpload(true);
            request.setPassword(callback.prompt(bookmark,
                    LocaleFactory.localizedString("Passphrase", "Cryptomator"),
                    MessageFormat.format(LocaleFactory.localizedString("Create a passphrase required to access {0}", "Credentials"), file.getName()),
                    new LoginOptions().anonymous(true).keychain(false).icon(bookmark.getProtocol().disk())).getPassword());
            return new DescriptiveUrl(URI.create(
                    new FileSharesApi(session.getClient()).fileSharesPost_0(request).getUrl()), DescriptiveUrl.Type.signed);
        }
        catch(ApiException e) {
            throw new StoregateExceptionMappingService(fileid).map(e);
        }
    }
@Test
    public void toUploadUrl() throws Exception {
        final StoregateIdProvider nodeid = new StoregateIdProvider(session);
        final Path room = new StoregateDirectoryFeature(session, nodeid).mkdir(
            new Path(String.format("/My files/%s", new AlphanumericRandomStringService().random()),
                EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
        assertNotNull(new StoregateShareFeature(session, nodeid).toUploadUrl(room, Share.Sharee.world, null, new DisabledPasswordCallback()).getUrl());
        new StoregateDeleteFeature(session, nodeid).delete(Collections.singletonList(room), new DisabledPasswordCallback(), new Delete.DisabledCallback());
    }